(This country was also known as Khwarezm, Chorasmia, Khwarezmia, Khwarizm, Khwarazm, Khorezm, Khoresm, Khorasam, and Chorezm.)
Start as OTL and divergence
In 1200, the Shah Ala ad-Din Tekish of Choresm died and was succeeded by his son, Ala ad-Din Muhammad II. 1212, the latter defeated the Gur-Khan Kutluk and conquered the lands of the Kara-Kitai, to whom the Choresmians once had had to pay tribute. 1217/18, he planned to attack the Caliphate of Baghdad, but too many of his soldiers died on the way in a blizzard in the mountains, so he had to postpone the attack. The attacks of the Mongols 1219-25 didn't happen ITTL of course, but in 1222, Shah Muhammad still died, so he was succeeded by his son Jalal-ad-Din Manguberdi I. (OOC: There's not too much known about him; IOTL, he managed to save himself by jumping from a dangerously high place into a river after having lost against the Mongols; even Genghis is said to have been impressed by his courage, so I'm giving him the benefit of doubt and make him a courageous warrior ITTL.) Jalal-ad-Din reigned a great empire, consisting of OTL today's Iran and all the -stans; however, this also meant he had to care for various groups trying to rebel against him. Being a good warrior, he eventually succeeded and kept the empire together, which was achieved in 1230. Of course, the Choresmians never had to fight as mercenaries after the Mongol defeat, so they wouldn't plunder Georgia in 1225/26, or confuse the Middle East in the 1230s.
1233, Jalal-ad-Din demanded formal recognition from the caliph in Baghdad. When the caliph Al-Mustansir rejected his claim, the Shah proclaimed one of his nobles caliph and marched towards Baghdad to depose the caliph. In 1236, the Choresmians took Baghdad and toppled the old Abbasid caliph. Al-Mustansir was imprisoned, but some of his relatives fled to Egypt and the lands of the Rum-Seljuks. This victory was consolidated 1239, when the Shah married his daughter Khadiya to his puppet Caliph.
Some confusion happened in 1240: After a governor of the Shah had insulted the new Mongol leader Ogadai by killing his diplomats, the latter decided to attack Choresm. In the battle near the city of Otrar, Ogadai and Jalal-ad-Din met each other. The attack of the Mongols was successful at first, but the courageous Shah managed to collect his men and prevents a catastrophe. The situation at other frontiers was also indecisive. Fortunately, Ogadai would die soon after (without the Shah knowing it), and Jalal-ad-Din could continue his expansion. 1246, the little countries of the Zangids were conquered by Choresm. In 1252, Choresm tried to attack the rich kingdom of Ormus, but was surprisingly defeated by the strong fleet of the latter. During the 1250s, various border clashes between Choresm and the Sultanate of Delhi happened. But in 1255, Jalal-ad-Din died. Some areas of his empire (Kara-Kitai, Afghanistan) tried to break away; the Kara-Kitai managed to stay independent, but Afghanistan was pacified in the following years and stayed in the fold.
Now in 1262 the Ayyubid sidelines still reigning in Syria who feared the rising power of the Mamluks and Rum-Seljuks appealed to the new Shah Manguberdi II for protection. Thus, Choresm's sphere of influence now bordered the Mediterranean. A few years later, in 1268 the little Crusader States of Antiochia and Tripolis (in Lebanon, not in Libya) were conquered by Syrian and Choresmian troops.
The Harunid and Karluk dynasties
In 1292, the last Anushtiginid Muhammad III died and was replaced by the army commander Harun II, who died the same year however, but not without founding the Harunid dynasty, which would last until 1318, when it was replaced by the Karluk dynasty, members of another Turkic tribe. The new Shah Arslan I consolidated the empire and also added Kashgar to it.
Some time later, in 1334, Choresm and Mamluk Egypt clashed over Syria / Palestine. Choresm won and annexed northern Palestine, but news about unrests in Afghanistan forced the Shah to cancel further advancing. In 1352, Egypt allied with the Sultanate of Konya against Choresm. The invaded Syria together, defeated the Choresmian armies several times. When Choresm was in a desperate situation, the Shah hired the Assassins in 1357 to get rid of his enemies. The general of the Mamluks and the Sultan Kilij Arslan IV of Konya were killed. Choresm made peace, only had to give northern Palestine back to Egypt.
Under the weak Shah Arslan II, in 1365 the Persians threw off the Choresmian yoke, forming a new Shi'ite empire under the Zahedid dynasty (named after an old Sufi order) that included Azerbaijan and Mesopotamia. Afghanistan also became independent again. And in 1371, the Rum-Seljuks picked up the pieces in Syria where the breakdown of the Choresmian empire had left a power vacuum. In addition to the Civil War that followed on the death of the Shah in 1372, in the years 1378-85 the Black Death stroke Choresm, preventing a reconquest of Persia; and 1386-89, the leader of the steppe people Arik-Buqa stroke against the weakened empire. After his hordes finally left, as the historians say, "not even grass grew any more" in the ravaged north-eastern provinces.
Under the Atsizids
In 1390, a capable army commander ended the Choresmian Civil War and made himself Shah Atsiz II. After the hard decades before, he and his successors gave Choresm stability for more than a century. They took up trade relations with Hong China and fought off various steppe people and the Persians, who tried to make Choresm a tributary. 1520, Shah Atsiz IV even invaded Persia, took Chorasan for his empire.
In 1530 however, the Atsizids died out, which threw the country again in Civil War. The war even extended outside of the country: 1538-40, Choresmian troops and Mongol (and related) warriors clashed with Russian settlers north of the empire, in what would become Novorossiya. Only in 1546, another army commander restored order and founded the dynasty of the Dawudids.
Dawud II proved to be a very bad ruler. 1585-87, Persia attacked Choresm, took Chorasan back. But 1589, the young son of Shah Arslan III overthrew his distant uncle, and killed him (and his son). He'd become one of Choresm's greatest rulers. Arslan IV also introduced the printing press to Choresm in 1599.