My understanding is that he essentially snuck out of the city. Roggvir opened the gates for him, against the wishes of the Solitude court (which warrants the question why the gates were closed in the first place, but I can find no explanation for this. It could be normal procedure). I doubt there was a bloodbath involved however, we'd have learned of it if there was.