A Queens man who survived an electric shock and fire two years ago when he climbed atop an empty, stopped Amtrak train after a night of bar hopping in Boston is suing the railroad – because Amtrak didn’t do enough to protect trespassers like him.

Brian Hopkins, 25, of Astoria, was discovered engulfed in flames at about 4 a.m. atop the high-speed Acela train, having been jolted by 27,500 volts from arcing overhead wires.

Hopkins had been visiting friends in Boston when he suddenly proclaimed that he “wanted to get back to New York” and left a friend’s house at about 2 a.m., according to published reports at the time of the July 2006 incident.

Hopkins, an architect, apparently tried to pry open one of the parked trains before climbing on top.

He suffered third-degree burns over 85 percent of his body, and doctors have since amputated his left hand and leg, according to the lawsuit filed last month in Brooklyn federal court.

Amtrak “should have known that persons trespassed” in the South Station area where Hopkins was found, he and his parents contend in court papers.

The family claims that Amtrak should have monitored the area, cut off the electricity going to the overhead wires, and even parked its trains somewhere else when they weren’t in use.

Amtrak declined to comment on the pending litigation.

kathianne.bonniello@nypost.com