Along with the arrival of the 5G era, sustainable and renewable energy supplies have become urgent demands towards plentifully distributed devices utilized for constructing smart cities. On the one hand, although the low-entropy fossil energies are constantly transformed into high-entropy energies and consumed through various batteries, the large-scale combustion inevitably brings a huge carbon footprint and severe climate changes. On the other hand, mechanical energies are widely distributed in the urban environment in types of vibrations and rotations, and natural areas in types of water waves, rainfalls, and winds. With the development of mechanical energy harvesting technologies like triboelectric, piezoelectric, electromagnetic, etc., various mechanical energy harvesters with optimized structures and selected materials, including triboelectric nanogenerator (TENG), piezoelectric nanogenerator (PENG), electromagnetic generator (EMG), etc., have been demonstrated for efficiently extracting electric power from ubiquitous existed mechanical energy sources like wind, water waves/flows, raindrops, vibrations, human motions, organs, and so on. With a comprehensive review of energy harvesting-assisted Internet of Things (IoT) applications among smart environmental monitoring (wind, ocean, and agriculture), smart transportations (drivers, vehicles, ships, roads, and bridges), smart homes (windows, floors, accessories, and human-machine interfaces), smart healthcare (wearable/portable devices, and implantable devices), the concept of smart cities are being promoted to conform with requirements of carbon neutrality and environment-friendly. Moreover, by combining developed self-powered sensor nodes, self-sustainable wireless sensor nodes, and self-charging energy storage units, the concept of IoT will be reinforced by increasing 5G endpoints and accelerates digitalization in smart cities. • A comprehensive investigation of mechanical energy harvesting technologies from principle to materials is provided. • Progresses among smart environmental monitoring, smart transportations, smart homes, and smart healthcare are reviewed. • Strategies of smart cities improved with energy harvesting assisted wireless sensor nodes/networks are discussed. • Emerging research fronts about energy harvesting technologies supporting smart cities are summarized.