24K Magic" was written by Bruno Mars, Christopher Brody Brown and Philip Lawrence, while production was handled by the latter three, as Shampoo Press & Curl and additional production by The Stereotypes.
The song received a Grammy Award nomination for Record of the Year at the 60th Annual Grammy Awards.
"24K Magic" is a "synth-heavy" funk, disco and contemporary R&B song.
The song is heavily influenced by the sounds and styles present in the 1970s and '80s.
Lewis Corner of Digital Spy commented that the song is more like the "smooth '80s electronica and hip-hop" than the "'70s groove of "Uptown Funk"."