The 30-year-old rapper took the stage at the Staples Center in Los Angeles, California, alongside his Top Dawg Entertainment labelmates, ScHoolBoy Q and A$AP Rocky, moments before the two wrapped up their co-headlining set.
Just as fans were preparing to call it a night, Lamar bolted onstage for an epic rendition of the lead single off his platinum-selling D.A.M.N. album.
BET's third annual concert extravaganza, which kicked off on Thursday, also featured performances from Snoop Dogg, Kid Cudi, DJ Khaled, Wiz Khalifa, Migos, Gucci Mane, Rae Sremmurd, Lil Yachty, Young Thug, Pusha T, Jhene Aiko and Bryson Tiller.
A day after taking the stage at the BET Experience, Lamar joined Future at the 2017 BET Awards to perform his guest feature on the "Mask Off" remix, before taking home an award for Best Male Hip-Hop Artist.
During his acceptance speech, the Compton, California, native paid homage to Mobb Deep rapper Prodigy, who died last Tuesday.
"He inspired my first mixtape at 16 years old, Y.H.N.I.C," Lamar shared to a packed house inside the Microsoft Theater in Los Angeles. "Off that album I was inspired to study my skills and work on my connection with my neighborhood and how I [can] inspire them, the same way he inspired the streets."