Swartz committed suicide by hanging himself in his apartment in Brooklyn, New York City, aged 26. Speaking at his son's funeral, Robert Swartz said, "[Aaron] was killed by the government, and MIT betrayed all of its basic principles."