Mr Maye had publicly expressed his concern about the worsening violence
Somali MP Mohamed Osman Maye has been shot dead outside a mosque in the town of Baidoa, the seat of parliament.
He was thought to have been an ally of President Abdullahi Yusuf.
He is the first MP to have been assassinated since Ethiopian forces helped the interim government oust Islamists from power in December 2006.
Meanwhile, Islamist militants who took over the port town of Kismayo last month have imposed a curfew following the assassination of several residents.
"The curfew started on Monday night and will go on until we secure the town," Abdurrahman Ali Mohamed, who is charge of security in the town, told BBC.
Insurgents of the al-Shabab group seized control of Kismayo in August after a three-day battle in which an estimated 70 civilians were killed.
The BBC's Mohamed Olad Hassan says Kismayo, Somalia's third city, is strategically important because it serves as a port for the south of the country.
He says it is the biggest city the Islamists have seized during their 20-month insurgency.
Al-Shabab, a radical wing of the Union of Islamic Courts which ruled much of southern Somalia in 2006, has refused to participate in a UN-backed peace initiative taking place in Djibouti.
Hundreds of thousands of people have been displaced in fighting which has been worst in the capital, Mogadishu.
Earlier this week, Mr Maye gave a speech to parliament, expressing his concern about the worsening violence.
"He was shot in the head outside a mosque where he had attended evening prayers," MP Amir Shaketi told the AFP news agency.
Somalia has been without a functioning national government since 1991 and has suffered ongoing civil strife.