Miranda Lambert is lending her talents to an upcoming movie, Hot Pursuit, starring Reese Witherspoon and Sofia Vergara -- but you won't be seeing her on the silver screen.

The singer wrote and sang a new tune, "Two of a Crime," at the request of one of the film's leading ladies.

“Reese texted me and told me about the movie and wanted me to write something or sing or both," Lambert reveals to Ryan Seacrest. "I got inspired. I love Reese and Sofia. It was a bit of a Thelma and Louise theme, and that’s totally up my alley.

"It is really so fun to be part of it," she adds. "It was the first time I wrote a song specifically for a movie, so it was a different experience for me.”

Witherspoon told Lambert that she was looking for a song with "a Southern and a Latin flavor," and Lambert delivered. With lines like, "We're a different combination, you and me / The way I play it cool and you bring the heat / But I've got your back, and I know you've got mine / That makes us two of a crime," the song fits perfectly with the movie's plot, about an inept police officer (Witherspoon) who joins forces with the widow of a drug dealer (Vergara).

Lambert wrote the song with frequent co-writers Natalie Hemby and Nicole Gallyon, which was clearly a smart move. The three are the reigning Song of the Year winners at the ACM Awards, for Lambert's hit single "Automatic."

Lambert recently wrapped her 2015 Certifed Platinum Tour, but she still has plenty of dates on the road this summer. See her complete schedule on her website.

Hot Pursuit will open in theaters on May 8. "Two of a Crime" is available for download on iTunes.

Listen to Miranda Lambert, "Two of a Crime":

See a Childhood Photo of Miranda Lambert + More Country Stars

You Think You Know Miranda Lambert?