Lauper wrote this song with the Country singer Mary Chapin Carpenter. On her Hat Full of Stars album, Lauper covers some unsavory subjects, including incest and domestic violence. This song is about a girl who dies from a back-street abortion. Lauper explained to The Independent: "We just put our ideas together. I grew up playing in an alleyway where there was a guy named Sally and he had pigeons. I had a Barbie and Ken like the onlooker in the song. And I had to take the wash in at four o'clock when I was eight years-old because if I didn't the pigeons would s--t on the sheets and I'd have to wash the sheets again. Part of the woman in the song is me - when I was a kid, things went on that everybody knew but didn't talk about."
The lyrics for "Mary, Did You Know?" were written by Christian singer and comedian Mark Lowry, after his pastor asked him to write a Christmas musical for their church. Southern gospel musician Buddy Greene later added music to his words.