I believe he even lied to Mike in the boathouse about not knowing it was going to be a hit. Fredo was a clear and present danger to the family and he had to go just like any traitor.
Fredo knew the Feds had Pentangeli, and that the Senate lawyer, Questadt, belonged to Roth. Probably he knew that because Roth told him. Had he passed on that info to Michael at any time before the boathouse meeting, he would have been immensely helpful to his brother, and might have earned a pass. He didn't. That tells me that, even after Havana, Fredo was still intent on hurting his brother.