After washing ashore on a strange island, Gulliver wakes up to find himself tied to the ground by a race of extremely small humans, who take him prisoner and present him to their rulers.
In a little time I felt something alive moving on my left leg, which advancing gently forward over my breast, came almost up to my chin; when, bending my eyes downwards as much as I could, I perceived it to be a human creature not six inches high, with a bow and arrow in his hands, and a quiver at his back.
(Swift, Gulliver's Travels, eNotes eText)
He is taken as a royal oddity, secured by a chain, and prevented from leaving. For a time, the Lilliputians treat him as an enormous animal to be displayed for entertainment. After saving the royal palace from a terrible fire by means of his full bladder, Gulliver is allowed his freedom as long as he takes care not to destroy anything. Later, he helps Lilliput defeat the rival island of Blefuscu by stealing all of their ships; when he refuses to act as a military weapon -- his earlier act being passive and non-violent -- Gulliver is sentenced to blinding. He escapes to Blefuscu, where he is allowed to refurbish an abandoned ship and leave.
In Lilliput, the six-inch-high residents of that land capture Gulliver, who has washed up on their shores. They bind him as he lies on the beach and shoot their tiny arrows in him, which do not harm him, but are painful. The Lilliputians build a conveyance to transport him to their city, where he becomes a sensation. Although they keep him on a chain, they feed him and give him a large palace to sleep in. He learns their language and their customs. Some of their political disputes and practices amuse and confuse him. For example, he learns that political leaders are chosen not for their wisdom or negotiating skills but by how well they perform a rope dance. He also learns of the ongoing animosity between the High-Heels and the Low-Heels (which is reminiscent of the polarization that political parties caused in Swift's England).
When the empress's apartment catches fire, Gulliver thinks quickly and uses his full bladder, which he has not relieved that day, as a source of water to put out the flames. Although this saves the building, the Empress is horrified and refuses to move back into her rooms. Gulliver is given his freedom to move around the kingdom as long as he does not harm any Lilliputians. Eventually the emperor recruits him to assist in the war against Blefuscu, a neighboring island. The war that rages between the two islands goes back generations and revolves around whether one should crack a boiled egg from the big end or the little end (which satirizes the shaky ground on which many historical wars have rested).
Gulliver assists Lilliput in the war by stealing a fleet of Blefuscu's ships—which to him is like playing with toy boats. But when he refuses to help Lilliput conquer the other country, Lilliput sentences him to blinding. With the help of a Lilliputian friend, he flees to Blefuscu, from where he is able to escape the land of the little people.