MIAMI — When Alan Ket was a teenager growing up in the Williamsburg section of Brooklyn in the 1980s, he fell hard for the graffiti that still decorated New York City trains. Sometimes he was the one painting, but more often, he was a detective, figuring out the best locations to snap pictures of the art. On weekends, he’d meet up with friends at a one-hour photo shop on Canal St. to trade negatives and prints of the graffiti photos they’d taken that week.

Preservation was the key. “So many beautiful works of art were being destroyed every week,” he said recently. “It was horrifying.”

At the time, he would cut school to spend afternoons at the studio of Henry Chalfant, who had been the crucial documentarian of 1970s train graffiti. Mr. Chalfant had largely stopped photographing trains, and he implored Mr. Ket and his friends to pick up the baton: “He told us it was up to us to document our own movement.”

Mr. Ket (born Alain Maridueña) took that mandate seriously, and built a life on it, culminating in the opening Thursday of the Museum of Graffiti, in the Wynwood section of Miami, the first institution devoted to telling the art form’s history, as well as documenting its stylistic developments with a curator’s eye for detail.