EXCLUSIVE

Miley Cyrus and Shawn Mendes are hard at work putting the finishing touches on a new single together ... TMZ has learned.

Sources familiar with the project tell us the song will drop in the coming weeks ... and is likely to end up as a track on Miley's new album. It's the first time the duo has paired up for any type of collab.

Shawn and Miley fans started to connect the dots that something was up Tuesday night when Miley posted a photo from rehearsals for the Grammys. Cyrus posed in front of some guitars and amps ... and some noticed Shawn's guitar in the background. What's more ... his name appears to be marked on another piece of equipment.

Waiting for your permission to load the Instagram Media.