He violated what is called the 1867 "tenure of office act." This states that the president cannot remove somebody from office who has been appointed by the senate.
Didn't find the answer you were looking for?