Hein was born in Delfshaven, the son of a captain, and he became a sailor while he was still a teenager. In his twenties, he was captured by the Spanish, and served as a galley-slave for about four years, when he was traded for Spanish prisoners.
In 1607, he joined the Dutch East India Company and left for Asia, returning with the rank of captain five years later. He settled in Rotterdam, and later became a member of the local government (schepen).
In 1623, he became a vice-admiral and sailed to the West Indies the following year for the Dutch West India Company (WIC). In Brazil, he briefly captured the Potuguese settlement of Salvador. In a subsequent trip, he captured several Portuguese ships with a large cargo of sugar. Piracy was condoned by the WIC, but this is, in fact, what made Hein most famous.
In 1628, Hein sailed out to capture the Spanish fleet loaded with silver from their American colonies. Part of this fleet had been warned because Hein had been spotted, but the other half continued its voyage. Twelve Spanish ships were trapped off the Cuban coast in the Bay of Matanzas, and Hein captured about twelve million guilders of booty in silver and other expensive trade goods. He returned to the Netherlands in 1629, where he was hailed as a hero.
He became Lieutenant-Admiral in 1629. He died the same year, fighting the Dunkirk pirates. He is buried in the Oude Kerk in Delft.
The Piet Hein Tunnel in Amsterdam is named in his honor, as is the former Dutch frigate Hr. Ms. Piet Heyn.
A direct descendant of Hein was Piet Hein, a famous 20th century physicist and poet.