Parliament speaker Mohamed Mursal agreed late Sunday to accept the motion, signed by 92 out of 275 legislators.
The document accuses the president, commonly known as Farmajo, of violating the constitution “by engaging (in a) secret memorandum of understanding with foreign countries.”
It specifies control over Somalia’s ports “and uniting the country with Ethiopia and Eritrea.”
The motion was filed a month after Farmajo met Ethiopian Prime Minister Abiy Ahmed and Eritrean President Isaias Afwerki for talks on cementing economic ties between their once-rival nations.
The tri-nation diplomatic breakthrough was made possibly by a rapprochement between Ethiopia and Eritrea, engineered by Abiy.
The impeachment motion will succeed if its sponsors muster support from at least two-thirds of the 275 legislators in the federal parliament.
Observers say the target will be hard to reach, given the entrenched factionalism of Somali politics.
A date for the vote has yet to be set.
The two deputy speakers held a press conference to distance themselves from involvement in the impeachment motion.
“The speaker rushed to receive this document, which gives us the feeling that he was angry with something,” said the first deputy speaker, Abdiweli Ibrahim Mudey.
“We want to inform the public that our friend Mohamed Mursal will take responsibility for any consequences.”
Mudey added that, under the constitution, any impeachment motion should be scrutinised by a Constitutional Court, but the long-troubled country does not currently have such a tribunal.
Farmajo was elected by parliament in February 2017 in a vote seen as a major step forward for a country devastated by years of civil war.
Political life has been relatively calm since then, punctuated by a spell of turmoil earlier this year when Speaker Mursal’s predecessor, Mohamed Jawari, quit in a power struggle with the government.
Outside politics, regional conflict still grips the north of the country and al-Qaeda-affiliated jihadists are pursuing a bloody campaign to overthrow the government.
On Monday, the capital Mogadishu was rocked by protests against the proposed impeachment of President Farmajo.
Groups of people had as early as 7am (local time), started marching along the main streets, shouting slogans against the motion.
The motion was made public by the Administrative Director of the Legislative House, Mr Abdikarim Haji Abdi Buuh, on Sunday afternoon.
Hours later, the First and Second deputy speakers of the Parliament, Mr Abdiweli Sheikh Ibrahim Mudey and Mahad Abdalla Awad, respectively, termed the intended move illegal.
Protesters, waving green leaves and sticks shouted, among other slogans: “We cannot accept nation-damaging motions.”
“We cannot support Dollar-recipients,” a suggestion that the motion was sponsored with money.
The sponsors of the motion claimed that the security situation had not improved under President Farmajo, and that he had entered into agreement with other parties, especially with Ethiopia and Eritrea, before they were scrutinised by parliament.
The problem started last week when Mr Mudey announced the dissolution of the parliamentary committee on finance and budgets.
The committee had earlier criticised the Finance ministry and the Municipality of Mogadishu for financial irregularity, a claim both rejected.