Nayzia Thomas, from Kansas City, US, posted the snap of herself with her laptop and workbooks next to her, while she was sat in the hospital bed.
“My mum took this pic and it’s the perfect explanation of my life,” she wrote on 12 December.
“Yes I’m about to have a baby, but final SZN [her course] ain’t over yet.”
The tweet had more than 130,000 likes and nearly 30,000 comments, with people applauding the mum-to-be for dedicating time to her work.
Two days later, she updated her new fans on the arrival of her baby.
“On 12/12/17 we had a healthy baby boy,” she wrote on 13 December. “However, I experienced major blood loss and my body went into shock post-delivery.
“It was very scary, but his father was right there to take over when I went unconscious. We are blessed! And I’m finishing the semester with a 3.5 GPA [Grade Point Average, which works out as an ‘A’].”
Seeing as her new-found Twitter fame meant people were following her journey as a new mum, Nayzia updated fans again on 16 December, writing: “Last update: got a blood transfusion because of all the blood loss and we finally headed home today!
“Thanks to everyone again for the positivity and love.”
People on Twitter praised the mum and commented on how great her hair looked after giving birth.
Speaking to The Independent, Thomas said: “School is so important to me. I didn’t want (the pregnancy) to be in the way.
“That’s what people expect. You’re a teen mum, you’re a young mother. That’s why my mum took the photo. It shows I follow through.”
“She’s clearly determined to give her baby the best life possible and work hard to achieve it,” Freegard said. “But while her tweet has gone viral, millions of mums around the world are also achieving amazing things everyday, multi-tasking, juggling, working through pain and stressful situations to bring up their family right.
“It would be wonderful to see much more celebrating these unsung heroines and the power of parenthood in 2018 - and end the negative and divisive mum-shaming which has been too prevalent these past few years. Here’s to #parentpower.”