He spent 13 days in jail before his brother came to Mexico City and distributed funds to Mexican lawyers and officials which allowed Burroughs to be released on bail while he awaited trial for the killing, which was ruled culpable homicide. Vollmer’s daughter, Julie Adams, went to live with her grandmother, and William S. Burroughs, Jr. went to St. Louis to live with his grandparents. Burroughs reported every Monday morning to the jail in Mexico City while his prominent Mexican attorney worked to resolve the case. According to James Grauerholz two witnesses had agreed to testify that the gun had gone off accidentally while he was checking to see if it was loaded, and the ballistics experts were bribed to support this story. Nevertheless, the trial was continuously delayed and Burroughs began to write what would eventually become the short novel Queer while awaiting his trial. However, when his attorney fled Mexico after his own legal problems involving a car accident and altercation with the son of a government official, Burroughs decided, according to Ted Morgan, to "skip" and return to the United States. He was convicted in absentia of homicide and sentenced to two years, which was suspended.
"Destroy all that which is evil. So that which is good may flourish."- Boondock Saints
It's pretty much how it happened according to this fascinating and well researched article:-
The Death of Joan Vollmer Burroughs: What Really Happened?, James Grauerholz's article published by the American Studies Department, University of Kansas.
I didn't realise that this film was so well researched - even snippets of dialogue were incorporated in the screenplay.