This was released as the third promotional single from American dance rock band Cobra Starship's fourth studio album, Night Shades. The track was written and produced by Norwegian production team Stargate and features Pittsburgh MC Mac Miller.
Night Shades tells a love story about a boy who is still enamored with his broken-hearted ex-girlfriend. This song finds the boy trying to forget his former beau in a club and getting himself drunk. Frontman Gabe Saporta told Billboard magazine that the album allows listeners to be privy to his romantic turmoil. He explained his job became "my world," and the aftermath of Cobra Starship's successful Hot Mess, "caused me to lose my girlfriend, who I had been with since before Cobra started."
Mac Miller recorded his contribution before the commercial success of his Blue Slide Park album. Despite having the opportunity to add a more famous rapper to the track, Saporta chose to go with the then little known MC. "We worked on the track with Stargate and they're totally hooked up," he revealed to The Boombox. "They had a big name rapper that they wanted to get on the track. My vibe was like, 'I feel like everyone has used the same big name rappers all the time,' and I just wanted to get someone who was fresh. I was already a Mac Miller fan. I heard 'Let 'Em In,' 'Knock, Knock.' I love [those] song[s], so that's why I wanted him on the record."
Saporta told Billboard magazine: "The song is kind of like, fun, cheeky, screw-you-haters vibe."
The song's music video finds Cobra Starship helping old folks across the street and other assorted good deeds, only to end getting the finger themselves. Mac Miller couldn't make the shoot, and filmed his parts whilst on tour. Saporta explained the clip's concept to MTV News: "We definitely didn't want the video to be angsty; a lot of people hear the title 'Middle Finger' and they think it's a mean or angry song, it's not about that, it's about letting go and having fun... and I think that's the vibe we wanted to have with the video, so, we thought it would be funny if old ladies gave us the finger."
Miller's rhymes contributed to the song's laid-back vibe. Said Saporta to MTV News: "That's actually the first time I met him, when he was he came to do his rap for 'Middle Finger.' He was super chill, super laid-back, he wrote his stuff there in the studio. It was good vibes, man. It gives the song a totally different flavor," he added, "and we definitely did that consciously. Most pop songs right now are like straight-up bangers, so we wanted to do something that might stand out a little bit and be a little more down-tempo."