Johnson ignored the Tenure of Office Act, so he was impeached for this reason.
President Andrew Johnson removed Edwin Stanton, the Secretary of War. The Tenure of Office Act states that the President may not remove certain staff members who hold power without prior approval from the United States Senate.