James Jeffery, who claimed to be a member of hacking collective Anonymous, said he targeted the British Pregnancy Advisory Service because he opposed the decisions of two women he knew to have abortions.
Prosecutors say the 27-year-old defaced the site with an anti-abortion statement and the Anonymous logo, and stole personal information about some 10,000 women.
He later boasted about the attack on Twitter, using the name of late Colombian drug lord Pablo Escobar as a pseudonym.
Jeffery was tracked down through his Internet service provider address, and pleaded guilty to two charges under the Computer Misuse Act.
Passing sentence at London's Southwark Crown Court on Friday, Judge Michael Gledhill said there could have been "terrible consequences" if Jeffery had published the women's details.
"Many of them were vulnerable women, vulnerable simply because they had had a termination or because of their youth or because their family did not know about their situation," the judge said.