The history of the S-2 began in World War II, when the US Navy still used so called "Hunter/Killer teams", in which one plane had the task to track a submarine with its sonar and the second one had to sink it. However this concept became too risky, as if communication between the aircraft gets jammed by something, the mission would be failed and in addition to that, new submarines with nuclear propulsion were invented, which were faster and were able to dive deeper and they also became more quiet, so the US Navy needed a far more capable successor, able to perform both roles.
Thereupon, Grumman developed a prototype called Grumman G-89, in which the Navy showed interest. The aircraft was first flown under the specification XS2F-1, on 4th December 1952. The first definetive S-2A Trackers entered service in February 1954 with the Anti-Submarine Squadron VS-26 of the US Navy. All in all 500 aircraft were built for the US Navy and additonally, 100 S-2A were exported to other countries.
Other variants were the S-2B, which had more advanced Sonar and armament; and the S-2C, which had a larger weapons bay and a larger tailfin, to carry its higher weight. The next version was the S-2D, which had a greater wingspan and an even larger tail, more space for internal fuel and more space for sonabuoys (32 at all). Besides that, the forward fuselage was enlarged, to make more room for the crew. The S-2D entered service in May 1961.