The Internet of Things (IoT) is the enabler for smart city to achieve the envision of the "Internet of Everything" by intelligently connecting devices without human interventions. The explosive growth of IoT devices makes the amount of business data generated by machine-type communications (MTC) account for a great proportion in all communication services. The fifth-generation (5G) specification for cellular networks defines two types of application scenarios for MTC: One is massive machine type communications (mMTC) requiring massive connections, while the other is ultra-reliable low latency communications (URLLC) requiring high reliability and low latency communications. 6G, as the next generation beyond 5G, will have even stronger scales of mMTC and URLLC. mMTC and URLLC will co-exist in MTC networks for 5G 6G-enabled smart city. To enable massive and reliable LLC access to such heterogeneous MTC networks where mMTC and URLLC co-exist, in this article, we introduce the network architecture of heterogeneous MTC networks, and propose an intelligent hybrid random access scheme for 5G/6G-enabled smart city. Numerical results show that, compared to the benchmark schemes, the proposed scheme significantly improves the successful access probability, and satisfies the diverse quality of services requirements of URLLC and mMTC devices.