Ultimately, Michael figured out the truth about Shales. He discovered the buried body and used that information as leverage.
Mahone was arrested again in the Season 4 episode "Blow Out" while working with Michael’s team to take down The Company.
The brilliance of Mahone’s arrest lies in what it creates: an alliance. Had Mahone remained an FBI agent, he would have remained the villain. By arresting him and throwing him into Sona alongside Michael and Lincoln, the show forced a truce.
Officially, the case went cold. Shales was just “missing.”