What does the phrase “to splice the mainbrace” mean and Where does it come from?

Either literally or figuratively “to splice the mainbrace” required the full crew of a sailing vessel.

The mainbrace is the rope by which the mainsail is trimmed.

To splice this rope requires the services of the entire crew, and at the conclusion of this arduous task it became the custom in the British Navy, in days of sail, to serve rum to all hands.

From that custom, “to splice the mainbrace” became the accepted naval term in the early nineteenth century as a call to serve grog, a call speedily adopted among landlubbers and still in use by them, though long dropped in nautical lingo.