"CAPTURED!!! The hunt is over. The search is done. The terror is over. And justice has won. Suspect in custody," the Boston Police Department tweeted.
Tsarnaev was taken away on a stretcher to a hospital in serious condition with unspecified injuries, police said.
The arrest marked the end of another dramatic standoff that unfolded fewer than 24 hours after Tsarnaev's brother and accomplice, Tamerlan Tsarnaev, 26, was shot dead in a wild gunbattle with police.
Earlier Friday, a huge dragnet blanketed Boston and its suburbs in search of Dzhokhar, who is believed, along with his older brother, to be responsible for the bombings.
Nearly a million residents were behind locked doors for most of the day as heavily armed police searched for Dzhokhar. Authorities initially feared that he might have explosives and put up a fight.
The hunt capped a night of violence that began Thursday about five hours after the FBI released surveillance photos of the brothers, whose Chechen family fled that war-torn region of Russia before eventually coming to America in 2002.
Late Thursday, police initially thought the Tsarnaev brothers robbed a convenience store near the Massachusetts Institute of Technology campus in Cambridge. Later, authorities said the brothers were there only by coincidence and did not rob the store.
Shortly after the robbery at 10:20 p.m. Thursday, gunshots were reported to police. The brothers apparently ambushed a baby-faced MIT university police officer, Sean Collier, 26, as he sat in his patrol car. They allegedly shot him multiple times.
Collier's roommate told the Boston Globe: "He was the guy who went to help. The best guy got shot down by the biggest scumbags."
After the officer's coldblooded slaying, the brothers allegedly carjacked a Mercedes SUV and held the driver hostage while they tried to use his cash card to get money from ATMs.
The suspects told the driver they were the marathon bombers, but at some point, they released him unharmed at a gas station in Cambridge.
Police tracked the SUV using its built-in GPS system and followed the Tsarnaevs into Watertown. When officers grew closer in a frenzied chase, authorities said the brothers hurled explosives at them through the window.
"They were also utilizing bombs, which sounded and looked like grenades, while engaging in the gunfight," Andrew Kitzenberg, of Watertown, told NBC News. "I saw them light this bomb. There was smoke that covered our entire street."
The two brothers had a bomb, he said, that looked like a pressure cooker - the same device authorities say was used to make the marathon explosives.
A fiery gunbattle ensued in which a transit officer was shot and critically wounded.
Tamerlan Tsarnaev fell to the ground, gravely injured. He was handcuffed and taken to Beth Israel Deaconess Medical Center, surrounded by more than a dozen cops. He was in cardiac arrest, had a burn on his right shoulder and chest, and a gaping wound on his torso. He was pronounced dead at 1:35 a.m.
His brother, the one who wore the white hat near the marathon finish line, ran away, prompting a lockdown of the Boston area, including Watertown - ground zero of the search. Mass transit was ordered shut down and classes at MIT, Harvard and other area schools were canceled for the day. The Boston Red Sox and Bruins postponed games Friday night.
Residents of Boston and its suburbs were urged to stay inside with their doors locked.
Authorities said later Friday that they had searched about 40 streets in Watertown and were unable to find Dzhokhar Tsarnaev. About 6 p.m., officials lifted the stay-inside order. Less than an hour later, gunfire erupted in Watertown, as officers engaged Tsarnaev.
A standoff ensued as TV-news outlets near the scene reported crowds of dozens of neighbors looking on as police worked to coax the volatile suspect into custody - alive. After a family was evacuated from the house where Tsarnaev had holed up in the back yard, police used stun grenades to weaken the suspect, sending booms across the jittery neighborhood.
By 8:45 p.m., a bloodied Tsarnaev emerged from his hideout, "alive, conscious, captured," a state official said. Hundreds of weary residents cheered as a caravan of law enforcement vehicles filed out of town.
At a news conference late Friday, Boston Police Commissioner Edward Davis said that the resident of the house where Tsarnaev was saw blood on the boat in his back yard. Then he opened the tarp and saw the man covered in blood and called police.
"We got that call and we got the guy," said Watertown Police Chief Edward P. Deveau.
Authorities had prepared to find Tsarnaev wearing an explosive vest or have other bombs and artillery.
"We believe this to be a man who's come here to kill people, and we need to get him in custody," Davis said.
No explosives were found on Tsarnaev.
Local, state and federal authorities went door-to-door in Watertown, with K-9 teams, explosives experts and SWAT. Specialists were trying to determine whether the brothers had ties to foreign or domestic terrorist groups.
With the lockdown stretching hours, some residents grew jittery.
Near the Tsarnaev family home on Norfolk Street, which straddles the Cambridge-Somerville line, some residents felt trapped and uneasy, surrounded by police and yellow tape.
"It's too crazy," Chalena Gaustek, 23, told the Wall Street Journal. "I want to get on a plane and go far away from Cambridge but now we're stuck here."
Although the brothers were active on social media, they leave few hints as to why they would kill and maim innocents.
On a Russian social-media page, Dzhokhar describes "Islam" as his worldview and asked to identify "the main thing in life," responds: "career and money."
He lists a verse from the Quran:
"Do good, because Allah loves those who do good."
Just two hours after the bombing, on his Twitter account, Dzhokhar wrote:
"Ain't no love in the heart of the city, stay safe people."
- Staff writer Morgan Zalot contributed to this report.
On Twitter: @barbaralaker