The history is well-described in Wikipedia's article on string theory. There have been many books written about string theory. Two that I found helpful regarding the history are Davies and Brown's Superstrings: a Theory of Everything?, published in 1988 (which may provide some indication as to the answer to your question), and Smolin's The Trouble with Physics. Here'a a brief summary:
String theory got its start in 1968 as a theory of hadrons (particles that interact via the strong nuclear force), not as a theory of everything. The beginning was Gabriele Veneziano's theory explaining certain phenomena in hadron scattering (straight-line Regge trajectories). His work grew out of the S-matrix program, which eventually lost out to quantum chromodynamics as a theory of the strong interaction. Veneziano's theory was subsequently understood to be a string theory by Nambu, Nielsen, and Susskind. After the general acceptance of quantum chromodynamics, around 1973, work on string theory (and the S-matrix program more generally) went into a period of decline.
A few people continued to investigate string theory during the 1970s. Originally, string theory was a theory of bosons only, and was only consistent as a relativistic quantum theory in 26 space-time dimensions. Supersymmetry was developed by Ramond in 1970 in order to introduce fermions, and the resulting theory was consistent in 10 space-time dimensions. In 1972, Neveu and Scherk discovered that string theory described gauge bosons, such as the photon, and in 1974, Yoneya and, independently, Scherk and Schwartz discovered that it had a spin-2 boson. It was Scherk and Schwartz who, at that time, proposed that the spin-2 particle could be the graviton, and therefore that string theory was a candidate theory of everything rather than a theory of hadrons.
This did not immediately make a strong impression in the physics community. That only happened 10 years later, in 1984, due the the influence of Ed Witten. The precipitating event was the discovery of anomaly cancellation by Green and Schwartz in Autumn 1984. In quantum field theory, an anomaly is a quantum effect that violates a symmetry of a theory. In order for the theory to be consistent, there must be some effect canceling the anomaly. Here is a quote from an interview with Schwarz in the Davies and Brown book (page 77)
In 1984, Michael Green and I did a calculation for one of these superstring theories to see whether, in fact, this anomaly occurred or not. What we discovered was quite surprising to us. We found that, in general, there was indeed an anomaly that rendered the theory unsatisfactory. Now there was the freedom to choose the particular symmetry structure that one used in defining a theory in the first place. In fact, there were an infinite number of possibilities for these symmetry structures. However, for just one of them the anomaly magically cancelled out of the formulae whereas for all of the others it didn't. So amid this infinity of possibilities, just one unique one was picked out as being potentially consistent.
The name of the symmetry structure is called $SO(32).$
We also discovered at about the same time that there was a second symmetry structure that seemed to be a consistent possibility which has the name $E_8\times E_8.$ The bizarre thing was that at that time, we didn't have a specific superstring theory that could contain that symmetry. ... But shortly thereafter a group of four physicists at Princeton University, now known as the Princeton String Quartet, discovered two new superstring theories which they called heterotic strings. One of these theories incorporated the $E_8\times E_8$ symmetry. The other one was a second example of a superstring theory based on $SO(32).$
The $E_8\times E_8$ theory was the one that aroused the most interest because that's the symmetry structure that looks most promising for accommodating the observed phenomenology of particles.
The Wikipedia article states that Witten and Alvarez-Gaumé had previously looked at anomalies in superstring theories and had concluded "that type I string theories were inconsistent." Smolin's book (page 115) contains an interesting quote from Schwartz about the aftermath of Green and Schwartz's result on anomaly cancelation:
[B]efore we even finished writing it up, we got a phone call from Ed Witten saying that he had heard ... that we had a result on canceling anomalies. And he asked if we could show him our work. So we had a draft of our manuscript at that point, and we sent it to him by FedEx. There wasn't e-mail then; it didn't exist, but FedEx did exist. So we sent it to him and he had it the next day. And we were told that the following day everyone at Princeton University and at the Institute for Advanced Study, all the theoretical physicists, and there were a large number of them, were working on this. ... So overnight it became a major industry [laughter], at least in Princeton—and very soon in the rest of the world. It was kind of strange, because for so many years we were publishing our results and nobody cared. Then all of a sudden everyone was extremely interested. It went from one extreme to the other: the extreme of nobody taking it seriously to the other extreme. ...
I have a personal recollection about this. I started as an undergraduate at Princeton in Fall 1983 and in Spring 1984 took freshman electromagnetism from the experimental particle physicist A.J.S. Smith. Once when he had to travel for one of his experiments (or perhaps it was to lobby congress for funding) he had a young assistant professor, a theorist named Jeff Harvey (later one of the Princeton String Quartet) give a guest lecture on his work on Grand Unification. The idea was to unify the strong nuclear theory (QCD) with the then-young unified electro-weak theory (the $W$ and $Z$ bosons had been discovered experimentally only a few years prior). Unfortunately, the most promising candidates predicted proton decay that was rapid enough to be already ruled out by experiment. There was little, if any, mention that I can recall of quantum gravity, and none of strings, in this talk.
Returning as a sophomore in the Fall, the buzz was all about strings. A seminar by Witten would lead to an overflow crowd, with people spilling out into the hallway trying to get a glimpse of the proceedings. By the time I entered my senior year, two years later, there was a palpable sense among my fellow undergraduates that while we had been struggling through coursework, the people around us had been finishing off physics. Things, of course, were not so simple, and look quite a bit different in retrospect.