Dos Santos came out firing to start the final round, but Velasquez (13-1) worked him down to the mat only to have Dos Santos (16-3) get back up against the Octagon walls.
The two traded lefts before Velasquez landed a left and took Dos Santos down head-first to the mat, causing referee Herb Dean to stop the bout at 3:09.
"It was a pretty tough fight," Velasquez said. "It was very difficult. It was a tough night. I give him a lot of credit, he is a tough fighter. We were ready for everything. We trained hard in camp and prepared for everything. I tried to get him down this time. I was trying to throw crisper punches this time. I love the competition."
The fight was third between the two. Dos Santos beat Velasquez in 1:04 in the first meeting in 2011, and Velasquez won the second by unanimous decision in 2012.
"I'm definitely satisfied," Velasquez said. "I just hope there are no more excuses on his part. That's it. We don't look for the finish. We just put more pressure on and when it happens, it happens."
In the co-main event, Daniel Cormier (13-0) unanimously outpointed Roy Nelson (20-9) in a heavyweight bout, with all three judges scoring it 30-27.
Velaquez took Dos Santos down twice in a row midway through the third round with several rights and pounced on him on the ground, but Dos Santos was able to make it to his feet.
In the post-fight press conference Dana White said he thought the fight should have been stopped in the third round.
"I've been around this sport and boxing for a long time and seen men who are too tough for their own good," White said. "I think Junior Dos Santos is one of them in the last Cain fight and this Cain fight. I think that fight should have been stopped. I don't think he should have taken more punishment."
Velasquez remained on the attack, landing several rights with Dos Santos up against the wall, opening up cuts on Dos Santos' left ear and mouth.
Velasquez continued the attack to begin the fourth round, landing several combinations in the first 40 seconds of the fourth round, and he continued the assault up against the Octagon wall. Dos Santos was able to break free and land a left.
However, Velasquez landed more combinations, including a left that opened up a cut above Dos Santos' right eye that stopped the fight for a moment before it was determined he could continue. Following the restart, Velasquez continued to land combinations, with Dos Santos getting in a left once.
"He beat me up. What can I say?" Dos Santos said in the ring after the fight. "He's a great fighter. I just want to give a good fight to the fans."
Dos Santos was not in the post-fight press conference.
Velasquez landed several lefts to start the second round and a kick to the head as well, cutting Dos Santos on the bridge of his nose. Velasquez had Dos Santos locked up against the walls of the Octagon several times in the second round, but Dos Santos landed a right at the end of the second round.
Velasquez took Dos Santos to the mat midway through the first round, but was unable to land any hard shots, and Dos Santos got to his feet. The two went after it from the start, with Velasquez landing a couple lefts, and Dos Santos hitting an uppercut to go along with two lefts.
The crowd was firmly in Velasquez's corner throughout the fight, yelling "Si, se puede" numerous times for the Mexican.
In the co-main event, Cormier took Nelson down in each of the three rounds, including less than a minute into the bout, but he could not keep Nelson down. Cormier controlled the bout, landing more strikes than Nelson, but Cormier was not able to land combinations.
Gilbert Melendez (22-3) earned his first UFC win, defeating Diego Sanchez (26-6) by unanimous decision — 29-28, 29-28 and 30-27 — in a lightweight bout. Melendez opened up a cut over Sanchez's left eye with a right hook with two minutes left in the first round.
The referee stopped the fight midway through the second and third rounds when the cut reopened but in both instances, the fight was continued. Sanchez came back with an uppercut and a flurry in the third round as the sellout crowd chanted "Diego! Diego!"