Now they are among the thousands of similarly uprooted people struggling to get by in Kabul, and also living with the fear that the Taliban are hunting for their famous son.
Messi, a UNICEF goodwill ambassador, also gave his tiny fan an autographed jersey and a football.
But the moment of happiness has quickly dissipated.
AFP met with the family recently in the cramped room in Kabul they are renting from another impoverished family, where Murtaza’s mother Shafiqa told how they had fled their home district of Jaghori in the night after hearing gunshots.
“We couldn’t take any of our belongings, we left only with our lives,” she said, her face half hidden by a scarf.
The fear felt by the Ahmadi family was ratcheted up when they learned that the Taliban were searching for the small Murtaza by name.
“(They) said if they capture him, they will cut him into pieces,” Shafiqa said, her eyes horrified.
Sports were rarely tolerated under the 1996-2001 Taliban regime, and the Kabul football stadium was a well-known venue for stonings and executions.
Shafiqa said she hid her famous son’s face with a scarf to prevent him from being recognised as they fled.
They took refuge first in a mosque in Bamiyan, before arriving in Kabul six days later. Among their belongings left behind are the football and jersey signed by Messi.
– ‘I miss Messi’ –
Although Afghan security forces have beaten back the Taliban in Jaghori, the family says it no longer feels safe.
“Local strongmen were calling and saying, ‘You have become rich, pay the money you have received from Messi or we will take your son’,” she said.
“At night we would sometimes see unknown men, watching and checking our house, and then the calls. During the days, we wouldn’t dare let him outside home to play with other children.”
The family have already fled once before, to Pakistan in 2016, where they sought asylum in “any safe country”.
They returned reluctantly to Jaghori after their money ran out, Shafiqa said.
Homayoun, Murtaza’s eldest brother who made him his plastic jersey, says that even in Kabul he is afraid. “We are worried something bad will happen if they know who Murtaza is,” he said.
Little Murtaza, meanwhile, says he misses his football and his jersey from Messi.
“I want them back so I can play,” he told AFP.
“I miss Messi,” he added.
“When I meet him, I will say, ‘Salaam’ and ‘How are you?’ Then he will reply saying thank you and be safe, and I will go with him to the pitch where he will play and I will watch him.”