Change the voice: He composed a beautiful song.
Change the voice: He composed a beautiful song.
Explanation
The sentence is in the simple past tense ("He composed").
The passive form uses "was" + past participle ("composed").
So, "A beautiful song was composed by him." is the correct passive voice.