Why did Andrew Jackson get impeached?

Andrew Jackson was never impeached. You may be referring to Andrew Johnson, who was impeached for violating the Service of Tenure Act.