A judge working for the militant group al-Shabab said she had had an affair with an unmarried 29-year-old man.
He said she gave birth to a still-born baby and was found guilty of adultery. Her boyfriend was given 100 lashes.
It is thought to be the second time a woman has been stoned to death for adultery by al-Shabab.
The group controls large swathes of southern Somalia where they have imposed a strict interpretation of Islamic law which has been unpopular with many Somalis.
According to reports from a small village near the town of Wajid, 250 miles (400km) north-west of the capital, Mogadishu, the woman was taken to the public grounds where she was buried up to her waist.
She was then stoned to death in front of the crowds on Tuesday afternoon.
The judge, Sheikh Ibrahim Abdirahman, said her unmarried boyfriend was given 100 lashes at the same venue.
Under al-Shabab's interpretation of Sharia law, anyone who has ever been married - even a divorcee - who has an affair is liable to be found guilty of adultery, punishable by stoning to death.
An unmarried person who has sex before marriage is liable to be given 100 lashes.
BBC East Africa correspondent Will Ross says the stoning is at least the fourth for adultery in Somalia over the last year.
Earlier this month, a man was stoned to death for adultery in the port town of Merka, south of Mogadishu.
His pregnant girlfriend was spared, until she gives birth.
Last month, two men were stoned to death in Merka after being accused of spying.
President Sheikh Sharif Sheikh Ahmed, a moderate Islamist, was sworn in as president after UN-brokered peace talks in January.
Although he says he also wants to implement Sharia, al-Shabab says his version of Islamic law would be too lenient.
The country has not had a functioning national government for 18 years.