It's The Invisible Hook: The Hidden Economics of Pirates by Peter T. Leeson:
Economist Leeson leads readers though a surprisingly entertaining crash course in economics in this study of high seas piracy at the turn of the 18th century. . . . Illustrated with salty tales of pirates both famous and infamous, the book rarely bogs down even when explaining intricate economic concepts, making it a great introduction to both pirate history and economic theory.