TMZ/Getty

Nick Carter is putting his feelings about his late brother Aaron Carter on wax -- as they used to say -- writing and recording a song where he sings about their rollercoaster relationship.

Music industry sources tell TMZ ... Nick got to work on the song shortly after Aaron died in November and as you'd expect -- considering the brothers' history -- it's a very emotional track.

Despite their complicated relationship, we're told the song expresses Nick's unconditional love for Aaron and his heartbreak over his brother seemingly never finding peace in his life.

Waiting for your permission to load the Instagram Media.

ncG1vNJzZmivp6x7tbnZZ5qopV9nfXN%2FjmloaGhpZLuqr8pmmpqqpJq%2FbrrEsGSsp56ceqKt0ailZpuRp8GmvoyrnKWZpJ68r7%2FHoqdmrKKkwqO4xKxm