Do we have any record of the magnetic compass' history of use? Do we know who first hypothesized that you could navigate using it? And were there any points earlier in history where someone attempted to prove that it could serve a practical purpose besides divination?
The short version:
There's a long history of divination in China. One of the forms of divination involved spinning a spoon or other elongated utensil on a circular board with various aphorisms or predictions in different parts of the circle. Usually these "divination spoons" were made of ceramic or stone, but at some point in the late Han dynasty the divination spoons started to be sometimes made out of metals like bronze. The exact timing is a little unclear, but sometime in the Song Dyansty, someone noticed that the divination spoons made of iron tended to point in more or less the same direction. Which made them somewhat less useful for divination.
The first mention of the these "spoon compasses" for surveying and navigational purposes is in the writings of the 11th-century polymath Shen Kuo. But writing in 1044, Shen does not claim credit for these early magnetic compasses, he merely documents them as a "recent innovation" and makes some suggestions for how to best use them (place the "needle" in a bowl of water so it will be level, use a compass rose with 24 points instead of only 8).
The above is cribbed shamelessly from Volume III of Joseph Needham's encyclopedic Science and Civilisation in China.