The new track will appear on the Creed II movie soundtrack, which is executive produced by Mike WILL Made-It.
"The Mantra" is the first of many big collaborations. The revealed tracklist lists music from Bon Iver, Vince Staples, A$AP Rocky, Nicki Minaj, AMA LOU, Ella Mai, Schoolboy Q and many more.
Kendrick Lamar's new collaboration arrives a month after his huge feature with Anderson .Paak on the infectious "Tints".
Last month Pharrell contributed a track to a 37-track cat memorial album for French artist Sophie Calle.