Under the advisement of Emmett Crawford, Annalise Keating represented Niles, who was the author of a book titled, The Psychopath CEO, which had Niles stating that people should do whatever it takes to get ahead. The book was used by prosecutor Ronald Miller as a sign that Niles was Andrew's killer, and the later reveal that Bethany was having an affair with Andrew appeared to serve as more evidence, suggesting that Niles killed Andrew after finding out about the affair.
However, when Annalise and Emmett informed Niles about the affair, Niles dropped a bombshell: Bethany was Andrew's killer. During one of their trysts, Andrew informed Bethany that he was ending his partnership with Niles and was joining a rival company. Andrew's departure would ruin things financially for the Harringtons, mainly Bethany, and in response, Bethany turned heel by strangling her illicit lover to death. Regarding her weapon of choice, the evil Bethany used her belt to kill Andrew, and after revealing his wife as a murderous villainess, Niles adamantly stated that he would not allow Bethany to take the fall.
This led to Annalise and Emmett to decide to have Niles' secretary (and alibi), Doris Reid, try on the belt, with Ronald stating that Niles should do the same. Both parties did so, and in Niles' case, the belt didn't fit him, which would normally prove him innocent. However, the trial ended with Niles being convicted, mainly due to the jury not liking his personality. Bethany was shown hugging Niles in consolation, though it can be suggested that she had hidden pleasure over getting away with her evil and murderous actions.