Owing to some special characteristics and features, blockchain is a very useful technique that can securely organize diverse devices in a smart city. It finds wide applications, especially in distributed environments, where entities such as wireless sensors need to be certain of the authenticity of the server. As contemporary blockchain techniques that address post-quantum concerns have not been designed, in this study, we investigate a blockchain in the post-quantum setting and seek to discover how it can resist attacks from quantum computing. In addition, traditional proof of work (PoW)-based consensus protocols such as Bitcoin cannot supply memory mining, and the transaction capacity of each block in a blockchain is limited and needs to be expanded. Thus, a new post-quantum proof of work (post-quantum PoW) consensus algorithm for security and privacy of smart city applications is proposed. It can be used to not only protect a blockchain under a quantum computing attack compared to existing classical hash-based PoW algorithms but also to supply memory mining. Meanwhile, an identity-based post-quantum signature is embedded into a transaction process to construct lightweight transactions. Subsequently, we provide a detailed description on the execution of the post-quantum lightweight transaction in a blockchain. Overall, this work can help enrich the research on future post-quantum blockchain and support the construction or architecture of emerging blockchain-based smart cities.