The present invention provides a polypeptide against hepatitis B virus X Protein and a pharmaceutical composition thereof. The polypeptide comprises D-amino acid and can inhibit DNA replication of hepatitis B virus and expression of related antigen, and further inhibit hepatitis, hepatic cirrhosis and liver cancer caused by infection of hepatitis B virus.