With respect to the lineage of Prophet Muhammad [pbuh], there are three versions: The first was authenticated by biographers and genealogists and states that Muhammads genealogy has been traced to Adnan. The second is subject to controversies and doubt, and traces his lineage beyond Adnan back to Abraham. The third version, with some parts definitely incorrect, traces his lineage beyond Abraham back to Adam [AWS].
After this rapid review, now ample details are believed to be necessary.
The first part: Muhammad bin Abdullah bin Abdul-Muttalib (who was called Shaiba) bin Hashim, (named Amr) bin Abd Munaf (called Al-Mugheera) bin Qusai (also called Zaid) bin Kilab bin Murra bin Kab bin Loi bin Ghalib bin Fahr (who was called Quraish and whose tribe was called after him) bin Malik bin An-Nadr (so called Qais) bin Kinana bin Khuzaiman bin Mudrikah (who was called Amir) bin Elias bin Mudar bin Nizar bin Maad bin Adnan. [Ibn Hisham 1/1,2; Talqeeh Fuhoom Ahl Al-Athar, p. 5-6; Rahmat-ul-lil'alameen 2/11-14,52]
The second part: Adnan bin Add bin Humaisi bin Salaman bin Aws bin Buz bin Qamwal bin Obai bin Awwam bin Nashid bin Haza bin Bildas bin Yadlaf bin Tabikh bin Jahim bin Nahish bin Makhi bin Aid bin Abqar bin Ubaid bin Ad-Daa bin Hamdan bin Sanbir bin Yathrabi bin Yahzin bin Yalhan bin Arawi bin Aid bin Deshan bin Aisar bin Afnad bin Aiham bin Muksar bin Nahith bin Zarih bin Sami bin Mazzi bin Awda bin Aram bin Qaidar bin Ishmael son of Abraham [AWS]. [Rahmat-ul-lil'alameen 2/14-17]
The third part: beyond Abraham [AWS] , Ibn Tarih (Azar) bin Nahur bin Saru bin Rau bin Falikh bin Abir bin Shalikh bin Arfakhshad bin Sam bin Noah [AWS] , bin Lamik bin Mutwashlack bin Akhnukh [who was said to be Prophet Idris (Enoch) [AWS]] bin Yarid bin Mahlail bin Qainan bin Anusha bin Shith bin Adam [AWS]. [Ibn Hisham 1/2-4; Rahmat-ul-lil'alameen 2/18; Khulasat As-Siyar p.6]