Habeas Corpus: If there is a complaint by any person that he is being detailed illegally or improperly, the law has provided means to set him at liberty. One of them is by writ of Habeas Corpus. It is therefore a process by which a person who is in a confinement without jurisdiction may secure his release from such confinement.
Filing Procedures:
1) The provisions contained in Appellate side rules shall be applicable to petition under article 226 of the constitution of India.
2) On application for a direction or habeas corpus shall be by special original petition entitled 'Writ Petition No.......of....
3) Every such petition shall set out the provisions of law under which it is made, the name and descripttion of the petitioner and the respondent, the nature of the relief sought and shall be accompanied by an affidavit setting forth the grounds of the relief sought, the other remedy, if any available to the petitioner and if not availed of, the reasons therefor. The petition shall be signed the petitioner or his advocate or attorney.
Hope this will give a preliminary idea about how to draft the or prepare the proposed writ.