Before it meant talking a bill to death, a filibuster was a pirate.
The root is Dutch. Etymonline traces the word to vrijbuiter, "freebooter," built from vrij, "free," and buit, "booty." A freebooter was a plunderer working for his own profit. English borrowed that Dutch word directly in the 1560s, and still has it as freebooter.
The same Dutch word also took a longer route. French made it flibustier, earlier fribustier, and Spanish made it filibustero. Etymonline says the silent "s" came from the French form and the extra "i" in the first syllable from the Spanish. It also credits the word's spread to a Dutch book about the buccaneers, written by one of them and translated into several languages.
In English, an early form, flibutor, shows up in the 1580s for a pirate. Historians came to use the word especially for the West Indian buccaneers of the 17th century.
Then the word came back with a new target. In the 1850s, Americans used the Spanish form for US adventurers who led unauthorized military expeditions into Central America and the Spanish West Indies. Etymonline dates this sense to 1851, when Narciso López led expeditions against Cuba.
The most notorious filibuster was William Walker. He first tried to seize part of Mexico, sailing from San Francisco in 1853. Then he went to Nicaragua at the invitation of a revolutionary faction. Britannica says he became president of Nicaragua on July 12, 1856. He was forced out, kept trying, and was executed in Honduras in 1860.
Etymonline dates the verb to 1853, in this freebooting sense.
The jump to politics came quickly. Etymonline finds filibustering used for obstruction in a legislature by 1861. The noun in that sense seems not to appear in US legislative writing before 1865. By 1893 it could name the delaying tactic itself. An NPR account gives later first dates for these senses, so the exact timing is uncertain.
The metaphor is easy to follow. A lawmaker who seizes the floor to stall a vote is acting like a freebooter: one person helping himself to something that belongs to the whole room.