Tyron Woodley won the co-feature, stopping Carlos Condit to set up a likely title bout against Hendricks in the 170-pound division.
Fighting in Hendricks' adopted hometown, Lawler opened a cut beside Hendricks' right eye in the fourth round. All three judges scored the fight 28-27 for Hendricks.
The title was vacated by Georges St. Pierre, who had held it since 2007. In his final defense, St. Pierre took a disputed split decision over Hendricks in November.
Hendricks improved to 16-2, and Lawler fell to 22-10 with one no contest.
The winner's background as a two-time NCAA wrestling champion at Oklahoma State helped him take down Lawler twice.
Hendricks and Lawler fought cautiously in the first round. Midway through the second, Hendricks landed a succession of punches and kicks. Lawler rallied in the closing minute.
Woodley's bout ended two minutes into the second round after his leg kick behind Condit's left knee caused his right knee to buckle. Condit fell to the octagon floor in pain, and hobbled out of the arena. Woodley is 13-2.
All but the title bout were scheduled for three five-minute rounds.
Also on the main card, welterweight Hector Lombard dominated the bloody Jake Shields, winning by unanimous decision. Shields lost a title bout to St.
It took light heavyweight Ovince Saint Preux just 1:29 to win by submission with a Von Flue choke against Nikita Krylov.
Lightweight Myles Jury, who has won all 14 of his professional bouts, took a unanimous decision over Diego Sanchez.
Among the prelims, Alex Garcia of Montreal took a fiercely contested welterweight split decision over Dallas' Sean Spencer.
Kelvin Gastelum opened a cut on Rick Story's left cheek in each round on the way to a split decision in a welterweight fight.
In the only women's bout, bantamweight Jessica Andrade of Niteroi, Brazil, won a split decision against Raquel Pennington.