Hégenheim (French pronunciation:  ⓘ; German: Hegenheim; Alsatian: Hagena) is a commune in the Haut-Rhin department in Alsace in north-eastern France. It is adjacent to the Swiss town of Allschwil, and is part of the Basel urban area.
 Hégenheim is a small town located in the northeastern quarter of France and in the southeastern part of the Haut-Rhin department.
 Hégenheim is part of the French suburb of Basel and is adjacent to the Swiss town of Allschwil.
 The village name probably originates from the Frankish period, and meant the "domain of Hagino", a Germanic name.
 The Roman period is marked by the presence of important Roman roads crossing the district, those leading from Porrentruy to Augst and from Binningen to Rixheim. The village was under the control of the Diocese of Basel. The bishops granted the estate to vassals, among them the Baerenfels family in 1482, who kept it until 1700.
 As a result of the devastation caused by the war of the League of Augsburg (1688-1697), the sisters Elizabeth and Anna of Baerenfels, owners of the old castle, took refuge in Bourgfelden. The estate then consisted of the castle, the farm and the orchard.
 After the battle of Friedlingen (1702), the castle was transformed into a hospital and was devastated. Almost abandoned, it was unduly occupied by a Basler. Louis XIV handed the domain to Laurent de Barbier, an officer of Picardy origin, as a reward for the many years he had spent in the service of France, and as compensation for the various wounds he had received. The latter had to resort to the Sovereign Council of Alsace to expel the usurper and take possession of his property in March 1703.
 At that time, he commanded the fort Saint-Pierre in Freiburg im Breisgau and later directed the construction of the fortress of Huningue. He ended his life in Oleron as commander of the fortress. His sons, Laurent-Amable and Pierre undertook the construction of the present castle, which was completed in 1737.
 The 17th century was marked by the establishment of a strong Jewish community at the gates of Basel, where they were not tolerated. In 1673, Hannibal of Baerenfels sold the Jews a plot of land to be used as a synagogue, but it was instead used as a cemetery.
 Due to restrictive laws in the region (notably in many Swiss cantons), Jews had trouble finding a place to bury their dead, so the cemetery of Hegenheim gained considerable importance. It contains about 8,000 graves. A synagogue was built in 1723, but invading troops burned it down in June 1815. It was rebuilt in 1821 and a Jewish care home for the elderly opened in 1874. In 1838, there were 845 Jews living in Hegenheim.
 Rising anti-Jewish sentiment came to a head in 1848, the year of revolutions. On April 23, 1848, a quarrel broke out because Hagenthal peasants had sung anti-Jewish songs. In a scuffle, a finger of a non-Jew was cut off. As a result, the Jewish National Guard was disarmed by an angry mob, the Jews were attacked and several Jewish houses were stormed and completely devastated. One child was killed. Only the deployment of troops was able to end the riots on April 25.
 Prior to the First World War, Hegenheim was an important watch production center. The Lévy watch factory employed about 100 workers, half of whom came from Switzerland. It was replaced by the Société anonyme Manufacture d'horlogerie du Haut-Rhin, which operated until 1963.
 According to Troll-Paffen climate classification, the climate in Hégenheim is semi-continental (german: Subozeanische Klimate, which means sub-oceanic) with most precipitation falling during the summer. Very hot temperatures during the summer or conversely bitterly cold temperatures during the winter are not unheard of.
 A harsh winter with more than 32 days of snow per year is followed by a hot and stormy summer.