He’s the songwriter behind some of Motown’s biggest hits — Marvin Gaye’s “How Sweet It Is,” the Supremes’ “Baby Love” and the Four Tops’ “Standing in the Shadows of Love,” to pick just three among dozens of iconic songs he helped pen.

But what Lamont Dozier really wanted to do was to write musicals.

“It’s true,” said Dozier, one-third of the famed Holland-Dozier-Holland songwriting team. “When I was at Motown, [label founder] Berry Gordy talked me out of going to New York [to work on Broadway] because I had this love for musical theater. The first time I saw ‘My Fair Lady,’ I was hooked. Something got inside of me that has wanted to get out.”

It’s finally getting out, at age 77.

Dozier is part of the team behind “Last Stop on Market Street,” a new musical opening Friday at Children’s Theatre Company.

“To have a Motown god working in this theater — how cool is that?” said CTC artistic director Peter Brosius.

Adapted from Matt de la Peña’s Newbery Medal-winning picture book, “Market Street” is about a cocooned grade schooler who visits his Nana in the city. The bus ride exposes young CJ to different kinds of people, and the beauty behind the hard surfaces of city life.

Dozier teamed up with his composer son, Paris Ray Dozier, and playwright Cheryl West for this work, which was co-commissioned by Children’s Theatre. Brosius said it speaks to CTC’s values, including seeding the field with new plays and using art to teach ethical living.

Among other things, the show addresses class differences in a society that prides itself on not being class-based.

“Matt’s book is gorgeous and deceptively simple,” said Brosius. “Here’s a kid from the suburbs who has come to visit his grandmother in the city. He has an impression about people who’re poor or homeless or covered in tattoos and scary-looking. But he learns that there’s always another story — that you open your heart before you judge.”

Linking two great theater cities

CTC partnered with the Chicago Children’s Theatre to commission the musical, which premiered in Chicago last spring. New songs have been added, and Lamont Dozier said the show has come a long way.

“When Paris and I were given the picture book by [artistic director] Jackie Russell of the Chicago Children’s Theatre, it was so skimpy,” he recalled. “But then Cheryl came on board and she’s so brilliant, she put it all together.”

For West, whose shows at CTC include “Akeelah and the Bee” and “Lizzie Bright and the Buckminster Boy,” that meant fleshing out the book’s characters, developing back stories and creating new scenarios to amplify Peña’s themes. One example: In the book, CJ lives in the city, but West sharpened the distinction between him and the other characters by making him a visitor.

“What I thought would be interesting is if we literally had an outsider — a fish out of water,” she said.

Another suggestion came from the show’s director, Henry Godinez, who also helmed the Chicago production. He is Cuban-American and suggested that the boy be Afro-Cuban.

The Doziers loved the idea, said West, “because it gives them a chance to incorporate some Cuban and Latin musical ideas.”

Hip-hop meets Motown

While Lamont Dozier is associated with soul, his son’s native musical language is hip-hop. The grandmother, played by Greta Oglesby, raps in “Market Street.”

“Hip-hop flows from Motown, it’s all part of the continuum,” said the younger Dozier, who grew up steeped in music but thought he might do something else. He actually is working on a graduate degree in psychology while his brother, Beau, is in the music business, currently working for “American Idol.”

“I’m proud of them, and of the music we’re all making,” said Lamont Dozier. “The world is pretty crazy now, but music brings us all together.”

Music may work as a sweet salve not just for the characters onstage, but for audience members, too, who are going on a 65-minute journey with a kid whose eyes are just being opened.

“We’ve all felt dislocated or in situations where we’re uncomfortable because we don’t know what the rules are,” said Brosius. “And sometimes we experience the world the way CJ does, which initially is to judge and reject it. But then we find a way to commingle and join the group, and that joy is so big.”

That sounds like a metaphor for something. To invoke another great songwriting team, Philadelphia’s Gamble and Huff, perhaps a love train.