While we don't have a precise location, fossils have been found in what is now China, specifically in the Sichuan, Xinjiang, and Qinghai provinces.
Based on the fossil evidence and the environment of the time, it's thought that Mamenchisaurus lived in floodplains, wetlands, and forests, likely near rivers and lakes.
Their long necks would have allowed them to reach high into the canopy to feed on leaves, while their massive size would have made them relatively safe from most predators.