Lin-Manuel Miranda (centre) and the company of Hamilton.
Photograph: Joan Marcus/Public Theater

In a letter to George Washington in 1794, the statesman Alexander Hamilton wrote, “It is long since I have learned to hold popular opinion of no value.”

But if he were alive today, he’d have a tough time ignoring the cheers and shouts and wild applause that greet Lin-Manuel Miranda’s canny and exuberant Hamilton, a fiercely original and dynamically quotational musical at the Public Theater.

Today we remember Hamilton from his handsome portrait on the $10 bill, a couple of half-recalled textbook paragraphs about the drafting of the constitution, and his senseless death on a New Jersey dueling ground. Miranda, best known for composing and starring in the jaunty Tony winner In the Heights, knew little more than that before reading Ron Chernow’s biography while bobbing in a swimming pool on vacation.

Miranda saw parallels between Hamilton’s story, a poor orphan from Nevis who proved himself on the streets of New York, and the up-by-the-questionably-legal-boot-straps narrative many hip-hop songs. Hamilton, here, is just “another immigrant, comin’ up from the bottom.” So while remaining faithful to the historical record, Miranda marries the facts of Hamilton’s life to a mostly sung through score that references and suggests and steals from rap, hip-hop, British invasion, indie rock, operetta and mega-musical. The show explores, as the lyrics in the chills-producing opening number explain:

How does a bastard, orphan, son of a whore and a|Scotsman, dropped in the middle of a forgottenSpot in the Caribbean by providence, impoverished, in squalorGrow up to be a hero and a scholar?

This isn’t parody and it isn’t even pastiche. Sure, a lot of the lines are borrowed from elsewhere and a lot of the music sounds very familiar. (George III’s pop ballad You’ll Be Back, performed by the superlative Brian d’Arcy James, is a duplicate of the Monkees’ Daydream Believer.) But the styles complement and clash so extravagantly and exuberantly that they create new genres of their own. It takes real dash to write a song like The Schuyler Sisters, almost a throwaway number, which somehow combines TLC with the Andrews Sisters and a hat tip to Three Little Maids From School Are We. Didn’t expect to see a show that could pay homage to both Stephen Sondheim and Biggie Smalls? You’re welcome.

Hamilton plays out on a mostly bare stage, adorned by a big, terrific, multicultural cast, led by Miranda himself. The Founding Fathers didn’t look like the men who portray them and the same holds true of their mistresses and wives. But director Thomas Kail’s corps reminds us of what the America that Hamilton helped to create looks like now, while also emphasizing Hamilton’s insider/outsider status. As the vibrant Daveed Diggs as the Marquis de Lafayette says to Hamilton, “Immigrants: We get the job done.” Then they high five. Then they win the war.

This is a thrilling show, but not by any means a flawless one. Andy Blankenbuehler’s choreography is too posey and pedestrian. The turntable set sometimes suggests a low-rent Les Miz. As the first act is all about winning the revolutionary war, the second one, which centers on creating a practicable system of government, has a far less propulsive arc. And while Miranda is a lucid and likeable actor, beautifully articulating his intricate rhymes, he’s also pretty nerdy, not a descriptor likely applied to Hamilton, whom Abigail Adams labeled “lasciviousness itself”. It’s a treat watching Miranda perform his own work, but I suspect a more obviously charismatic actor could enrich and enhance the role.

Still, Miranda has a regiment of laurels to rest himself on. There’s a refrain that echoes through several of the songs and even makes its way on to the cover of the Playbill: “Who lives, who dies, who tells your story?” With a show this brash and nimble, this historically engaged and startlingly contemporary, Miranda confirms his promise as one hell of a teller.