The name first appears in cuneiform tablets from Mesopotamia from the Ur III period (21st to 20th century BCE) in the form Adamshakh, with a probable meaning "Crocodile (Town)".
Later it was called "Andamaska" or "Andimaska", meaning "plenty of butter"; local villages like Gheel-AB and Lour and two fortresses were added to it. The city was en route to Ilam and Anshan and subsequently to Lorestan, which made it strategically important until the late Sassanid era.
During the Pahlavi dynasty era, Andimeshk received a great deal of modern development projects because of its location and resources. These included a railway, the Dez Dam, the Vahdati Air Base, the Dokoohe military depot and an aluminum factory-silo, as well as many other industrial developments. The city had been connected along the Trans-Iranian Railway in 1929. During World War II a pipeline was also laid from Abadan, then the location of the world's largest refinery, to Andimeshk; from there the fuel was re-loaded onto trucks and transported to the Soviet Union. In 1955 the pipeline was extended from Andimeshk to Tehran.
According to Tarikh-e-Tabari most of the people in this city are of Khuzi origin.
It had an estimated population of 190,000 in 2005,
and is the administrative centre of Andimeshk County.