 
The dynastic history of Thebes in Greek mythology is crowded with a bewildering number of kings between the city's new foundation (by Cadmus) and the Trojan War (see Ogyges). This suggests several competing traditions, which mythographers were forced to reconcile.
Overview.
The first kings of the Boeotia region (before Cadmus and the flood of Deucalion) were Calydnus and Ogyges (Ogygos). The first king of the settlement that would become Thebes was Cadmus, after whom the city was originally called Cadmeia. It only became known as Thebes during the reign of Amphion and Zethus, after the latter's wife Thebe.
When Cadmus died, his son Polydorus was still a minor and hence Pentheus, a son of Cadmus' daughter Agave and one of the Spartoi, became king. He met a tragic end after falling foul of the young god Dionysus.
Polydorus succeeded his nephew but only reigned for a short while. At his death, the kingdom was entrusted to his father-in-law, Nycteus, who acted as guardian for the young Labdacus, the son of Polydorus and Nycteis. During the regency of Nycteus, Thebes (Cadmea) made war against Epopeus, the king of Sicyon, who had abducted Nycteus' daughter, Antiope. (However, an alternate account says that Antiope fled Thebes to evade her father's wrath, and sought refuge with King Epopeus after finding herself pregnant by the god Zeus.) Nycteus and the Thebans were defeated, and Nycteus himself died of his battle wounds. He was succeeded as ruler of Thebes by his brother, Lycus.
Labdacus eventually became king. Another war erupted, this time over a boundary dispute between Thebes and Athens; once again, Thebes was defeated after King Pandion I of Athens received aid from the Thracian king Tereus. Labdacus himself survived the war. However, following in the footsteps of Pentheus, King Labdacus opposed the cult of Dionysus, and was killed by Dionysus' enraged devotees, the Maenads. Labdacus left behind a young son, Laius. Lycus again took control of Thebes, this time as a usurper, and denied Laius his birthright. This inaugurated a new dynasty. Lycus is said to have reigned for twenty years.
Lycus, as king and ruler of Thebes, waged war against Sicyon to avenge his brother and niece. This time, the result went in Thebes' favor, and King Epopeus was slain. However, Lycus and his wife Dirce proceeded to treat Antiope cruelly. Antiope was imprisoned, but she later contrived to escape, and was reunited with her twin sons, Amphion and Zethus.
Amphion and Zethus were the sons of Zeus by Antiope, conceived while Antiope was still in Thebes; they were born in secret and raised by shepherds in the vicinity of Mount Cithaeron. After their tearful reunion with their mother, Amphion and Zethus marched on Thebes and slew King Lycus and Dirce.
Lycus' death did not restore Laius to the throne. Amphion and Zethus seized power, ruling as joint kings of Thebes, and expelled Laius. Amphion's wife was Niobe, daughter of Tantalus, and they had seven sons and seven daughters together. Amphion and Zethus expanded the city (and renamed it Thebes) and built the seven gates of Thebes, naming them after Amphion's daughters (Thera, Cleodoxa, Astynome, Astycratia, Chias, Ogygia, Chloris). Niobe, a boastful woman, attracted the wrath of Artemis and her brother Apollo, who were furious at Niobe for taunting their mother. Artemis then decided to kill all of her daughters while Apollo killed all of her sons, thus all of her children were killed. Amphion committed suicide after the death of his beloved children. Zethus' son and only child had been killed earlier, and Zethus had died of a broken heart.
Thus, the throne of Thebes was vacant and the Thebans invited back Laius, who resided in the Peloponnesus under the protection of King Pelops, thereby restoring the original dynasty of Cadmus. When Laius became king, he married Jocasta, daughter of Menoeceus, son of Pentheus. Given that the Delphic oracle warned Laius not to have a son because that son was fated to kill his own father, Laius exposed his newborn son - who nevertheless survived, and grew up under the name of Oedipus. In a tragic tale - in which every step Oedipus took to avoid the oracle's predictions brought him closer to his fate - Oedipus killed King Laius and married Jocasta. Oedipus then became king of Thebes, as husband of the widowed Jocasta. The couple had four children, including two sons, Polynices and Eteocles.
When the seer Teiresias revealed Oedipus' horrible crimes - patricide, regicide and incest, no less - Oedipus was forced to abdicate. Jocasta killed herself, and Oedipus was shunned by his own children. Oedipus responded by cursing his sons Polynices and Eteocles.
Polynices and Eteocles made a pact that each should rule alternately for one year at a time. But Eteocles reneged on the pact, and Polynices was banished from Thebes. Polynices fled to the court of King Adrastus of Argos to raise an army, whose leaders were known as the Seven against Thebes. In this war, Polynices and Eteocles were each slain by the other, thus fulfilling Oedipus' curse.
After the deaths of Polynices and Eteocles, Jocasta's brother Creon, who before had governed Thebes after the death of Laius and after the exile of Oedipus, became regent for Eteocles' son Laodamas. It was during one of Creon's reigns that Heracles was born in Thebes. Creon served as protector of Heracles, his stepfather Amphitryon, and mother Alcmene. Creon even gave his daughter Megara in marriage to Heracles. In return, Heracles defended Thebes in two more wars that Thebes became entangled in, first against King Erginus of Minyan Orchomenus, then against Pyracmus of Euboea.
After the death of Eteocles and Polynices, Creon prohibited a proper burial of Polynices and his Argive allies. Theseus, King of Athens, led an army against Thebes and compelled Creon to give the fallen heroes the correct rites. When Eteocles' son Laodamas came of age, Creon resigned the rule to him. Like his father, King Laodamas was confronted with an attack by the Epigoni, the sons of the Seven led by Polynices' son Thersander. The Epigoni succeeded, and Thersander was installed as king of Thebes. King Laodamas was killed during this war.
Thersander joined the Greek forces in the Trojan War, but he was killed on the shores of Mysia before ever reaching Troy (by Telephus, a son of Heracles). His son Tisamenus was too young at the time to lead the Theban contingent; but he later came of age while the war was still going on, and entered the war close to its conclusion. This is the explanation given for why no Theban leader is mentioned by Homer in the Iliad.
References.
 ;templatestyles src="Reflist/styles.css" / ;