Officially, Johnson was impeached for violating the Tenure of Office Act, which had been passed over Johnson's veto, which prohibited the president from dismissing certain federal officials without Senate approval, and for denouncing Congress as unfit to legislate.