 The writing of " The Girl Is Mine " was completed by Jackson as he watched cartoons with Paul McCartney . Producer Quincy Jones had initially told Jackson to write a song about two men fighting over a girl . Inspired , Jackson awoke during the night and sang the song into a tape recorder . He later said , " I sang exactly what I heard in my head , starting with the melody and the keyboard and the strings and everything . So , I just orally put it all on tape . " Jones also asked Jackson to add a rap verse . The song was then recorded by Jackson and McCartney at Westlake Studios , Los Angeles , from April 14 to 16 , 1982 . The year before , the duo had recorded " Say Say Say " and " The Man " for McCartney 's fifth solo album , Pipes of Peace ( 1983 ) . 
