A molecular machine, or nanomachine, is any set of molecules which produce mechanical movements (output) in response to specific stimuli (input). The term is common in nanotechnology where a number of complex molecular machines have been proposed which might be a way of making a "molecular assembler". Molecular machines can be divided into two broad categories: synthetic and biological.

The 2016 Nobel Prize in Chemistry was awarded to Jean-Pierre Sauvage, Fraser Stoddart and Ben Feringa for the design and synthesis of molecular machines.