This paper proposes a novel tuned mass damping (TMD) system in building structures with hybrid functions-vibration control and energy harvesting. The regenerative electromagnetic TMD (EM-TMD) system comprises a pendulum-type TMD, a rotary electromagnetic (EM) damper and an energy-harvesting circuit. The structural vibration energy induced by earthquake or wind, which is a great amount, is absorbed by EM-TMD and converted to electrical energy by the EM damper, and stored in energy storage elements (such as supercapacitors and rechargeable batteries) by the energy harvesting circuit. As a result, the proposed EM-TMD systems can not only effectively protect building structures against excessive vibrations, but also provide regenerative and economical power sources to smart wireless sensing system or other electronic devices. This paper presents a proof-of-concept shaking table experiment in which a single-degree-of-freedom (SDOF) model equipped with a regenerative EM-TMD system has been tested. A prototype of rotary EM damper connected with two types of energy harvesting circuits, were tested and compared in this study. Three important properties, i.e., energy conversion efficiency, output power and control effect, were investigated and discussed. The results successfully validate the feasibility of conducting vibration control and energy harvesting simultaneously using regenerative EM-TMD system in buildings.