All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
It is permissible for the Muslim to write the biography of someone and publish it in a book. However, if this person is still alive, he should ask his permission because this matter is related to him and is his own right. Moreover, one should make sure about the information he is going to write. Also, he should avoid writing things which might be disliked by the owner of the biography, since mentioning something which he dislikes is considered backbiting, even if it exists in him, as stated in the Hadeeth of the Prophet, sallallaahu ‘alayhi wa sallam.
Moreover, there is no harm if the Muslim writes something about his personal life, for some of the righteous predecessors did so. For instance, Imaam Ash-Shaafi’i talked about his journey, which was later reported by his student Ar-Rabee’ (Ibn Sulaymaan) . Also, As-Suyooti wrote his autobiography in his book “Al-Muhaadharah” and so did some of the contemporary scholars.
However, it is not permissible for the Muslim to mention the sins he committed, since the Muslim is religiously required to cover up his sins. This is an obligation. It was narrated on the authority of Abu Hurayrah that the Prophet, sallallaahu ‘alayhi wa sallam, said: "All members of my Ummah will be forgiven except those who expose their wrongdoings. An example of this is that of a man who commits a sin at night and Allaah Conceals it; however, in the morning, he would say (to people), ‘O so-and-so, I did such-and-such yesterday.' Thus, at night Allaah Conceals his sin but in the morning he exposes himself.” [Al-Bukhari and Muslim]
Allaah Knows best.