We prepare a quantum state where each site of an optical lattice is occupied by exactly one molecule. This is the same quantum state as in a Mott insulator of molecules in the limit of negligible tunneling. Unlike previous Mott insulators, our system consists of molecules which can collide inelastically. In the absence of the optical lattice these collisions would lead to fast loss of the molecules from the sample. To prepare the state, we start from a Mott insulator of atomic 87Rb with a central region, where each lattice site is occupied by exactly two atoms. We then associate molecules using a Feshbach resonance. Remaining atoms can be removed using blast light. Our method does not rely on the molecule-molecule interaction properties and is therefore applicable to many systems.