Masjid Tanah is a mukim in Alor Gajah District, Melaka, Malaysia. The town has been inhabited since mid 1500 AD starting from a small village. It is one of the largest towns in Melaka. In the late 1990s, there was a real estate boom in Masjid Tanah when the government decided to build a Petronas oil refinery in nearby Sungai Udang.
The name of Masjid Tanah comes from the mosque (masjid) that was made from soil (tanah) by a sheikh from Gujarat around 1800. This mosque was also built by a local named Hj. Sulong bin Sibeng. Most of the mosque that was built from soil was demolished later but recreated in 1951. This mosque was shared by several kampungs (villages).
Each kampung has their own leader (ketua kampung). Most of the kampungs are named after plant species. This tradition of taking the name based on plants is probably influenced by the concept of the name of Melaka itself. Melaka is in fact a name of a tree.
Masjid Tanah, located in Alor Gajah municipal district, is very near to Negeri Sembilan. Hence, most of its people originate from Negeri Sembilan. They usually carry Negeri Sembilan or Minang accent, and shared the same culture of adat perpatih. In some kampung the "culture of doing thing together" or "gotong royong" was still implemented. But most of the culture is now forgotten. The young preferred to work in urban areas and the houses in the kampungs are mostly uninhabited.
Datuk Abu Seman Yusop, the former Malaysian Deputy of Home Minister (2009–2013), comes from this town. He is also the former PR for Masjid Tanah. After the 2013 Malaysian General Election, he was succeeded by Mas Ermieyati Samsudin (2013–current), the first female PR for Masjid Tanah.