The longest distance shot recorded -- in modern times, anyway -- is 1410.87 meters, unofficially, 6 October 1979, by Harry Drake of the USA while using a footbow. A footbow is a type of bow that is placed on the feet, and has a lot more power than "regular" bows which are held in the hand.
The current record for a "regular" target recurve bow is 485.27 meters, 5 September 2003, by Arlan Reynolds of the USA. This kind of distance-shooting archery is called "Flight Archery", and is a separate discipline in FITA Archery ("FITA" being the International Archery Federation, or "Federation Internationale de Tir l'Arc", the Olympic Archery Governing Body - they set the rules).
The longest shot ever, according to legend, is that by Aresh, a Persian archer, who is said to have shot an arrow over 500 miles........