In this paper, a novel robotic system called modular transformer (M-TRAN) is proposed. M-TRAN is a distributed, self-reconfigurable system composed of homogeneous robotic modules. The system can change its configuration by changing each module's position and connection. Each module is equipped with an onboard microprocessor, actuators, intermodule communication/power transmission devices and intermodule connection mechanisms. The special design of M-TRAN module realizes both reliable and quick self-reconfiguration and versatile robotic motion. For instance, M-TRAN is able to metamorphose into robotic configurations such as a legged machine and hereby generate coordinated walking motion without any human intervention. An actual system with ten modules was built and basic operations of self-reconfiguration and motion generation were examined through experiments. A series of software programs has also been developed to drive M-TRAN hardware, including a simulator of M-TRAN kinematics, a user interface to design appropriate configurations and motion sequences for given tasks, and an automatic motion planner for a regular cluster of M-TRAN modules. These software programs are integrated into the M-TRAN system supervised by a host computer. Several demonstrations have proven its capability as a self-reconfigurable robot.