MPs will gather at the airport to elect a new head of state.
On Tuesday evening, suspected Al-Shabab militants launched a series of attacks, with two mortar rounds fired close to the venue where the vote will be held.
Residents in Arbacow village outside Mogadishu say jihadists attacked an African Union military base there.
More than 20 candidates are vying to become Somali president, with the top three proceeding to a second round of voting and the top two from that round going forward to a third and final vote.
Incumbent President Hassan Sheikh Mohamud is standing for re-election and analysts say he is likely to be one of those who goes forward to the later rounds.
Results are expected later on Wednesday.
The airport is viewed as the most secure site in the Somali capital and voting was moved there from a police academy because of growing security concerns.
Wednesday's security measures will include a ban on flights to and from Mogadishu airport.
Correspondents said most schools and offices remained open on Tuesday but people had had to walk to reach their destination.
Analysts say holding the election in the airport environment may also reduce the possibility of vote buying or other corruption in the election process.
Somalia has not had an effective central government since the fall of the Siad Barre regime in 1991. The Mogadishu-based government is backed by an African Union force, Amisom, made up of more than 22,000 troops and police, as well as civilian staff.
Al-Shabab has a presence in much of the southern third of the country and has carried out many attacks in Mogadishu.
It has previously attacked the Somali parliament, presidential palace, courts, hotels and the fortified airport zone.
At least 19 politicians, as well as civilians and soldiers have been killed in its assaults.
A traffic ban has been imposed and major roads sealed off in the Somali capital, Mogadishu, ahead of a presidential vote.