The first show that truly launched the concept of musical theater was something called The Black Crook. This musical production was over five hours long and it ran for 474 performances, starting on September 12, 1866 in New York City's Niblo's Gardens. Giuseppe Operti adapted the music and Charles Barras wrote the book. Though it wasn't a musical in the same sense as we know them today, it was the production to launch the idea of incorporating music into the show with plot and situation relevance.
Most of the musicals that followed during the 1800s and early 1900s were more in the genre of musical reviews with cabaret type staging and feel. The musical selections followed one another with no real book or persistent story line.
Then came Show Boat (12-27-27, Ziegfeld Theatre). Kern, Wodehouse and Hammerstein II wrote the music for integration into the story, with the numbers scattered throughout and designed to advance the plot and characters. The show and the lyrics by Wodehouse and Hammerstein II were based on Edna Ferber's novel. The show ran 572 performances and was a groundbreaker at the Ziegfeld, where Flo Ziegfeld's previous shows had included lots of music, costumes and choreography but NO stories.
I hope this helps.
"Always smile at your enemies. It will keep them on their toes"