From Wikipedia:
Most species and hybrids of citrus plants called “limes” have varying origins within tropical Southeast Asia and South Asia. They were spread throughout the world via migration and trade. The makrut lime, in particular, was one of the earliest citrus fruits introduced to other parts of the world by humans. They were spread into Micronesia and Polynesia via the Austronesian expansion (c. 3000–1500 BCE). They were also later spread into Middle East, and the Mediterranean region via the spice trade and the incense trade routes from as early as ~1200 BCE.
To prevent scurvy during the 19th century, British sailors were issued a daily allowance of citrus, such as lemon, and later switched to lime. The use of citrus was initially a closely guarded military secret, as scurvy was a common scourge of various national navies, and the ability to remain at sea for lengthy periods without contracting the disorder was a huge benefit for the military. British sailors thus acquired the nickname “Limey” because of their use of limes.