It means "noose" - figuratively, hanging.
@BeastlyGerbil's answer is correct, but for completeness I checked for other uses of the word "halter" in the Entire Gutenberg Twain Files (warning: slow to load!)
The court informed him that a sheriff had been appointed to do the hanging, and—
Capt. Ned's patience was at an end. His wrath was boundless. The subject of a sheriff was judiciously dropped.
When the crowd arrived at the canyon, Capt. Ned climbed a tree and arranged the halter, then came down and noosed his man. He opened his Bible, and laid aside his hat. Selecting a chapter at random, he read it through, in a deep bass voice and with sincere solemnity. Then he said:
"Lad, you are about to go aloft and give an account of yourself; and the lighter a man's manifest is, as far as sin's concerned, the better for him. Make a clean breast, man, and carry a log with you that'll bear inspection. You killed the nigger?"
-- Roughing It, Chapter 50
"By advantage taken of one in fault, in dire peril, and at thy mercy, thou hast seized goods worth above thirteenpence ha'penny, paying but a trifle for the same; and this, in the eye of the law, is constructive barratry, misprision of treason, malfeasance in office, ad hominem expurgatis in statu quo—and the penalty is death by the halter, without ransom, commutation, or benefit of clergy."
-- The Prince and the Pauper, Chapter 24
The jailer finished by lifting himself a-tip-toe with an imaginary halter, at the same time making a gurgling noise in his throat suggestive of suffocation.
[...]
Another was a man who had been accused of stealing a horse; he said the proof had failed, and he had imagined that he was safe from the halter; but no—he was hardly free before he was arraigned for killing a deer in the King's park; this was proved against him, and now he was on his way to the gallows.
-- The Prince and the Pauper, Chapter 27
"Yes, we have," said another citizen, "we've got this"—and he produced a halter.
Many shouted: "That's the ticket." But others said: "No—Count Angelo is innocent; we mustn't hang him."
-- Those Extraordinary Twins, Chapter 10
By the garish light of the electric lamps I saw the little group of privileged witnesses, the wife crying on her uncle's breast, the condemned man standing on the scaffold with the halter around his neck, his arms strapped to his body, the black cap on his head, the sheriff at his side with his hand on the drop, the clergyman in front of him with bare head and his book in his hand.
-- From the 'London Times' of 1904
So Twain definitely uses the word "halter" to mean a noose for hanging, in his writings in general. Finally, let's look at the wider context of the quote you're asking about:
We were like to be drowned with the rain, deafened with the howling wind and the booming thunder, and blinded by the lightning. It was indeed a wild night. The drenching we were getting was misery enough, but a deeper misery still was the reflection that the halter might end us before we were a day older. A death of this shameful sort had not occurred to us as being among the possibilities of war. It took the romance all out of the campaign, and turned our dreams of glory into a repulsive nightmare. As for doubting that so barbarous an order had been given, not one of us did that.
First he's complaining about the weather, but then he changes topic to worry about the halter. It's not just a typo for "weather": the halter is a deeper misery than the weather. Note also the reference to a barbarous "order" being given - the order for hanging, and nothing to do with the weather.