Officers stopped Hong Young, 35, of Beltsville, Maryland, at around 10:30 p.m. Tuesday. The officers recognized Hong's vehicle -- a 1999 Lincoln Town Car -- as matching authorities' description of a car seen in surveillance footage near some of the shootings.
A gun in the car matched evidence found at the shootings, authorities said at a press conference, and Young was arrested.
Young is in the hospital and under police guard, though when reporters asked why he was being treated, officials would only say he was arrested without incident.
He is charged with attempted first-degree murder, first- and second-degree assault, weapons violations and reckless endangerment.
Young worked as a correctional officer at a Jessup facility from 2012 until his resignation in 2014, Maryland Secretary of Public Safety Stephen Moyer said. There was nothing significant in his employee file, Moyer said.
Police said that there are no links to terrorism, and no motive has been determined.
No one was killed in the five shooting incidents, four of which occurred Monday and Tuesday, according to police reports.
-- February 24 in Hanover, Maryland. a man who had stopped at a Costco said a man pulled up beside him in a Lincoln Town Car at 7:30 a.m. and began firing at him. The victim's vehicle was hit several times and the victim was grazed. The assailant drove away.
-- March 2 in Laurel, Maryland. Police received a call at 2:50 a.m. that shots had been fired at a Walmart. There were no damages or injuries.
-- March 2 in Columbia, Maryland. A call came in to law enforcement at 4:51 a.m.a bout shots fired at a movie theater at Columbia Mall. Surveillance footage captured a Lincoln Town Car at about the same time shots were fired, police said. Though several employees were there, no one was hurt, authorities said. There were bullet holes in the theater glass and a shell casing was found at the scene.
-- March 3 in Prince George's County. Multiple shots were fired at an overpass on the InterCounty Connector in the afternoon, striking a tree service truck with two passengers inside.
-- March 3 at Fort Meade. Shots struck a building near the NSA office at about 6 p.m.
Along with the gun, evidence shows Young was the shooter in all but the Walmart incident, though that investigation is continuing, police said.
Though no one was killed in the incidents, they stirred memories of the deadly Washington, D.C.-area sniper attacks
in 2002. Ten people were killed in Washington, Maryland and Virginia during that rampage, which went on for three weeks.