(covers information from several alternate timelines)
In 2268, the Defiant responded to a distress call in the unexplored Tholian sector, which was claimed by the Tholian Assembly. Shortly after entering the region, the Defiant's crew began experiencing sensory distortion, and insanity quickly spread throughout the ship. The ship's chief medical officer was unable to determine what was happening, and eventually the insanity induced by the phenomenon led the crew to kill each other.
Three weeks later, Starfleet ordered the USS Enterprise to mount a search and rescue mission to locate the Defiant. On stardate 5693.2, the Enterprise located the Defiant, only to find it trapped between universes in a space warp. The Enterprise's instruments recorded that space itself was literally breaking up, the result of a previously unknown phenomenon known as a spatial interphase. An Enterprise boarding party beamed aboard the Defiant and discovered signs of mutiny and insanity – the Captain's neck was broken and his crew was dead.
At that time the Defiant was visible in the "prime universe" while in the interphase. Later, as a result of a phaser exchange between the Enterprise and the Tholians, a hole was created through the spatial interphase. The Defiant was pushed through the hole to parts unknown and in the process trapping Captain James T. Kirk between universes. Captain Kirk was eventually saved when the Enterprise, encased in a Tholian web, entered the interphase and, upon utilizing full power, was thrown clear of the region while Kirk was locked in the transporter beam. (TOS: "The Tholian Web")
During the 22nd century, the Tholians of the mirror universe created an interphasic rift by detonating a tri-cobalt warhead within the gravity well of a dead star, and sent the distress call which lured the Defiant from its native universe to the "mirror" Tholians' own universe—the ship traveling not just from one universe to another but backwards in time as well. Soon after, the Tholians took the Defiant to a drydock built into an asteroid-moon in orbit around a gas giant in the Vintaak system and began a salvage operation. This operation was reported to Commander Jonathan Archer of the ISS Enterprise NX-01 through his contacts shortly thereafter. Archer and the ISS Enterprise were eventually ordered by Admiral Black to investigate. (ENT: "In a Mirror, Darkly")
Arriving in the system, Enterprise was destroyed by a Tholian web shortly after beaming an away team over consisting of Archer, Commander T'Pol, Commander Tucker, Lieutenant Reed, and Sergeant Travis Mayweather. They were able to escape by restoring the partially-deconstructed Defiant's shields and weapons, and destroyed the drydock.
At first, the Defiant could only reach impulse speeds because a Tholian slavemaster, a Gorn named Slar, had stolen a plasma regulator, one of the key components of the warp engines. After Archer trapped and killed the Gorn, Tucker was able to restore warp drive.
The USS Defiant then rendezvoused with the remnants of a Terran assault fleet still engaged with rebel forces. Two Andorian battle cruisers, one Vulcan D'kyr-type cruiser, and one Tellarite cruiser disabled the Terran ship ISS Avenger NX-09. Boasting 23rd-century technology from its native universe that outclassed the 22nd-century capabilities of the opposing force, Defiant easily destroyed all the rebel ships except one Andorian cruiser, which Archer intentionally allowed to escape.
After seeing how Archer had treated the rebel Vulcans, and learning of the existence of the United Federation of Planets in the other universe, T'Pol and Crewman Soval tried to sabotage the Defiant with Doctor Phlox's help. When Phlox disabled main power, the Defiant was left defenseless, and Avenger, commandeered by Soval and other non-Terrans, began firing at her. The Defiant received heavy damage until Tucker was able to stop Phlox and restore main power. Archer then ordered the destruction of Avenger. The Defiant's phasers and photon torpedoes caused heavy damage to Avenger, with the second barrage of photon torpedoes breaching Avenger's warp reactor, destroying the ship with all hands.
The Defiant arrived at Earth, now under the command of the self-proclaimed Empress Hoshi Sato. She ordered Admiral Gardner to surrender and stand by for instructions, or she would open fire on Earth. (ENT: "In a Mirror, Darkly, Part II")
Due to its potentially incendiary nature, the exact circumstances of the Defiant's arrival in the mirror universe (and the universe it came from) remained highly classified. (DIS: "Vaulting Ambition")
However, information about the Defiant and its origin in another universe was stolen by rebels fighting the Terran Empire in the early 23rd century. The data was then stored in a computer core aboard a Klingon vessel which was later destroyed in battle and recovered by the crew of the USS Discovery after they crossed over. (DIS: "Despite Yourself", "The Wolf Inside")
Because the Defiant was known to be patrolling sector 006 of Federation space in 2256, the crew of the Discovery correctly theorized that a temporal anomaly may have resulted in the Defiant's presence in the mirror universe. Captain Gabriel Lorca learned that information pertaining to the Defiant was classified to starship captains and above in the Imperial Starfleet and planned to infiltrate the ISS Shenzhou with Michael Burnham posing as her counterpart, who was captain of the Shenzhou. There they hoped to discover how the Defiant crossed over to the mirror universe and then to utilize that method to return to the prime universe without the use of the Discovery's spore drive. (DIS: "Despite Yourself")
Burnham was able to retrieve some information on the Defiant's crossover from the Shenzhou, however the information she had access to was heavily redacted. She was able to get the information back to Discovery, where Saru was able to determine from the available data that the Defiant had crossed over due to some sort of interphase. Emperor Philippa Georgiou was the only person in the Empire who had access to all of the data. (DIS: "Vaulting Ambition")
|Starships named Defiant|
|USS Defiant (NCC-1764) • USS Defiant (2370) • USS Defiant (2375)|
|Mirror universe: ISS Defiant|
|USS Ahwahnee • USS Constellation • USS Defiant • USS Eagle • USS Emden • USS Endeavour • USS Enterprise • USS Enterprise-A • USS Excalibur • USS Exeter • USS Hood • USS Intrepid • USS Korolev • USS Lexington • USS Potemkin • NCC-1700 • Unnamed|
|Mirror universe: USS Defiant • ISS Enterprise|
|Alternate reality: USS Enterprise • USS Enterprise-A • Unnamed|
The USS Defiant was originally named the "USS Scimitar" in an early draft of the script for "The Tholian Web." (Star Trek Compendium, et al.) This had been confirmed previously by Greg Jein, who owned all the script drafts written for Star Trek: The Original Series. 
The registry number NCC-1764 was originally conceived by Jein in his influential "The Case of Jonathan Doe Starship" article, published in the April 1973 issue 27 of the T-Negative fanzine. It was subsequently adopted by Bjo Trimble in her Star Trek Concordance, FASA's Star Trek: The Role Playing Game, and ultimately propagated by Michael Okuda's in his subsequent reference book writings, most notably his Star Trek encyclopedias (Star Trek Encyclopedia (1st ed., p. 72), and beyond). Jein's until-then conjectural ship's registry was elevated to canon for the "In a Mirror, Darkly" episodes in 2005, reaffirmed one year later when the remastered version of the Original Series started its release and where Okuda, then visual effects producer for the project, made use of the opportunity to retcon the registry again onto the ship in the remastered version of "The Tholian Web", after its earlier retcon in "In a Mirror, Darkly" in concordance with the books previously written by Okuda.
In his article incidentally, Greg Jein had already concluded that Defiant must have been a recent class addition in canon as of 2268. Since Jein used the Starbase 11 mission chart seen in TOS: "Court Martial" and the production ship naming memos used by the producers at the start of the Original Series second season as basis for his name/registry pairings, he had to come up with a higher registry for Defiant as that name had not been foreseen yet by the producers at that point in time. Taking both this and Kirk's 2267 "there are only twelve like it in the fleet" remark in TOS: "Tomorrow is Yesterday" (see: Constitution-class: Footnote #3) into account, this strongly suggested two things according to Jein; firstly, Starfleet changed its nomenclature from Starship-class to Constitution-class during the run of the TOS era (nicely tying in with Scotty keeping abreast by reading Constitution-clas technical updates for the ship he is working on in TOS: "The Trouble with Tribbles", and actually confirmed in canon with the introduction of the Defiant plaque in "In a Mirror, Darkly", which was obscured in its original appearance due to deliberate camera angles as it was, obviously, USS Enterprise's, then still Starship-class), and secondly, the Defiant belonged to a later batch of Constitutions (supported by the fact she has the highest registry number of all the visually established original configuration Constitutions). Commissioned somewhere during the TOS era, her career was therefore unfortunately short, at least in Star Trek's prime universe, or as Jein had succinctly put it, "Tough break".  Defiant being mentioned operational as early in the prime universe Pike-era therefore constitutes a continuity error, if one is to follow Jein's reasoning.
Producer Ted Sullivan has stated on his Twitter account that the Defiant was modified by the Terran Empire and that these changes were reflected in the wireframe model as featured in "Despite Yourself". 
The footage of the Defiant in the original airing of "The Tholian Web" episode was stock footage of the original Enterprise studio model, adapted in post-production.  The CGI model of the Defiant used in Star Trek: Enterprise was wholly built by Koji Kuramura. Nacelles, lighting and certain textures were "tweaked" by Rob Bonchune. The work was done at Eden FX, with reference help from Doug Drexler.  In the final draft script for "In a Mirror, Darkly," a note read, "We'll suggest the Defiant is a slightly newer vessel than Kirk’s ship; the exterior shows slightly more detail... intricate hull plating patterns can be visible in reflected light, etc.", and Eden's model reflected this as such.
According to Bonchune, the location of the aft torpedo launcher on the CGI model of the Defiant was "the little round port right between the impulses engines. We tried to make it logical with what existed so we didn't have to make a new hole on the ship. Everyone agreed, except that apparently if you frame by frame it, they actually come from the hangar bay phaser mounts. Someone in the chain either decided against it or didn't know. Even one of the writers was surprised it hadn't been done as discussed." 
Star Trek: Enterprise teleplay writer Mike Sussman noted in his "In a Mirror, Darkly, Part II" audio commentary that the aft phasers and torpedoes that the Defiant possessed indicated a variation from its Constitution-class sister ship, the USS Enterprise, as that ship apparently lacks or at least does not make on-screen usage of those weapons. It should be noted, however, that in the original series episodes "Arena", "Friday's Child", and "The Doomsday Machine", verbal reference to the Enterprise's aft phasers can be heard in a stock voice loop. Additionally, reference to starboard banks is made in "Balance of Terror", as well as the port weapons mentioned in "Mirror, Mirror".
Ironically, it was not Eden's model for the Defiant that was used for the 2007 remastered version of the Original Series source episode "The Tholian Web," but rather Petri Blomqvist's CBS Digital version.
The Defiant's mission patch was an insignia similar to the pennant on the sides of TOS starships, and seen as a set decoration on starbases of that era. A stylized version of this shape makes up the 2150s Earth Starfleet insignia. Three Defiant insignia badges; one command, one science and one engineering were sold in the 40 Years of Star Trek: The Collection auction for US$550 (US$660 with premium). 
During the events of the Glass Empires anthology, the Defiant acted as the flagship for the Terran Empire. It would also serve as the prototype for many other Constitution-class vessels, as well as newer, more advanced designs.
In the Star Trek: SCE novellas Interphase, Book One and Interphase, Book Two, the crew of the USS da Vinci rescue the damaged starship Defiant from interphase and the Tholians in the year 2376; the novellas were written before "In A Mirror, Darkly" was produced.
In the DC Comics Special #2 (published late 1994), the story "Raise the Defiant" tells of the Enterprise-A working to recover the Defiant from the Tholian rift during the 2280s to recover a classified phase-inverter capable of detecting cloaked vessels.
On the Star Trek DVD, the special features reveal that the USS Defiant of the alternate reality caused by Nero's arrival in the 23rd century, while maintaining the same registry, is a Mayflower-type starship.
The video game Star Trek Online brings in the Defiant in the Agents of Yesterday mission "Painful Omens." In it, the Defiant is caught up in a two-way battle between the Tholians and the Na'kuhl before the player character enters the fray. When the Tholian Queen, mad with grief and rage, opts to ram her ship into the Na'kuhl dreadnought, the Defiant is caught up in the two ships' destruction, trapping them in the spatial interphase. It is later revealed in the mission "Ragnarok" that the Temporal Liberation Front left a message in the Defiant's computers to contact Admiral Leeta and make her join their cause against the Galactic Union.