Ted Kennedy was in no way shape a form a moral, upstanding citizen.
You'd be ok if you hadn't said "in no way, shape, or form." He had a screwed up personal life for several years and there's Chappaquiddick. If Chappaquiddick were the defining moment of his life and the only thing he'd ever done, then he'd have gone down in history as a malevolent loser like Neil Bush. But he is also judged for his 45+ years in the Senate and his many accomplishments on issues that were divisive at the time but which have come to be embraced as national leaps forward, like abolishing the poll tax and fighting for civil rights against conservative opposition. He also looked out for the excluded, for poor people, for immigrants, for those without health care, for racial minorities, for gays and lesbians, but I understand some people would prefer to describe that as being a social liberal as opposed to a social conservative, and therefore not particularly moral. That's fine, this country can embrace a diversity of views.
Above all else, he knew how to work with people of opposing views and negotiate a compromise while staying true to his principles. That's why he is being remembered in a way that, say, Patrick Leahy won't. Or Jesse Helms.