Some people are confused about how the machine works because they have never used one before, reports the BBC’s Mohamed Moalimu from the city.
The machine, installed by Salaam Somali Bank in an upmarket hotel, allows customers to withdraw US dollars.
Somalia has a rudimentary banking sector, with many people relying on remittances from abroad.
Its development has been thwarted by more than two decades of conflict involving clan and religious-based militia groups.
Somali’s currency, the shilling, is almost worthless and many businessmen and foreigners deal in dollars.
The machine allows people to withdraw money from their international bank accounts, using cards like Visa, MasterCard and American Express, our correspondent says.
A spokesman for Salaam Somali Bank, Said Abukar, said people can only withdraw US dollars.
“We may add other international currencies in the future. People from the diaspora and foreigners have welcomed the move with enthusiasm. We are planning to install more ATMs in Mogadishu,” he told the BBC.
Omar Hassan, a visitor from the UK, said the installation of the machine was a “big step forward” for Somalia.
“I have been staying in Mogadishu for longer than I originally planned so I ran out of cash. I couldn’t believe my luck when I heard about the new cash machine,” he told the BBC, as he stood in the queue to withdraw cash.