Medical student, Joyce Torrefranca, took the picture of Daniel Cabrera kneeling on the pavement with the famous golden arches in the background in the Philippine city of Cebu.
She then posted the picture on Facebook saying: "I got inspired by a kid."
He's using a makeshift wooden bench as he writes in his workbook.
"For me as a student, it just hit me a lot, like big time," Joyce told the Philippine news network ABS-CBN.
Also Read
Joyce said seeing Daniel struggling with his homework inspired her to work harder.
The photo was quickly shared thousands of times with other people saying they had been inspired by him too.
Daniel was tracked down by ABS-CBN News who discovered his dad had died when his home was destroyed in a fire.
One of his siblings is sick and he now studies on the pavement outside McDonald's every night, near another restaurant where his mum works.
After the photos went viral, the local social welfare officer visited the Cabrera family to offer help.
Abraham Lincoln, the 16th President of the United States from 1861-1865, is known to have completed his initial studies under street lights and had to struggle hard to survive during the initial few years of his life.