Matthew Ahn wasn’t about to let a new subway stop strip him of his title: New York City’s swiftest straphanger.

The 25-year-old lawyer set the Guinness World Record last year for the fastest time to hit all 468 train stations. He did it in a super-sonic time of 21 hours, 49 minutes and 35 seconds.

But when the MTA opened its new 34th Street-Hudson Yards stop in September, creating the 469th station in the system, the record passed into oblivion.

Early Friday morning, Ahn set out to recapture his rail-riding glory.

“I was frustrated when I heard I no longer had the title, so I knew I had to take another stab at it,” Ahn told The Post as he began his journey by boarding a 2:02 a.m. A train at Far Rockaway and Mott Avenue.

He was dressed for the scorching heat in a salmon t-shirt, shorts and running sneakers, but only packed two bottles of water, a Diet Coke and five Cliff bars to minimize bathroom breaks.

“Hit the stopwatch!” he yelled at his friend, Jim Wright, as the subway doors closed. “This is gonna be interesting,” he muttered to himself.

Exactly 21 hours, 28 minutes and 14 seconds later — at 11:28 Friday night — Ahn stepped off the 7 train at Flushing Avenue and Main Street.

He had smashed his previous record by an astonishing 21 minutes and 21 seconds.

“All I want is a cold shower and maybe another one to get 21 hours of subway off me,” he declared, exhausted and dripping with sweat.

“I don’t want to sound full of myself, but this is a time I didn’t think was possible. It’s really pushing the limits. Hopefully Guinness will accept all of my proof,” he told The Post.

The evidence includes a time-stamped photo of each station taken from inside the train, a log of the exact time doors opened and closed, video of as much of his journey as possible and written statements from two witnesses who were present at the beginning and end.

The biggest threat to derailing his dream, he said, was keeping hydrated.

“There was one transfer I had to make around 12:30 p.m. when I had to run two miles from the end of the 2 line to the end of the 5 line and the heat was troublesome,” he explained. “I ended up buying an extra bottle of water.”

The transit trooper said he ran about 7.5 miles between transfers; Guinness rules mandate that they must be made on foot or by public transit.

The most surprising thing of all, Ahn said, was the mostly on-time service on the 50 trains he rode.

“There were only two significant delays of about 15 minutes on the S shuttle and the N,” he said.

The key to his underground success, Ahn said, was planning the most efficient route through the system’s 660 miles of track.

After first reading about the record, “I wonder[ed] how easy it would be to make a route that would beat that record?’ A few spreadsheets later, I had set up a route that I thought would beat it.”