The development of information and communication technology has changed the global trade landscape, including in Indonesia. The city of Pekanbaru as the capital of Riau Province has great potential in the development of e-commerce that is integrated with the concept of a smart city. This research aims to analyze the optimization of e-commerce through the implementation of the smart city concept in Pekanbaru. Using a qualitative approach and secondary data analysis, this study examines technological infrastructure, government policies, and community participation in supporting the e-commerce ecosystem. The results show that the implementation of the smart city concept can improve the effectiveness of e-commerce platforms through improved digital connectivity, integrated payment systems, and more efficient logistics services. The adoption of technologies such as big data, Internet of Things (IoT), and geographic information systems (GIS) also supports more responsive decision-making, both by business actors and government agencies. In addition, the involvement of local MSMEs is an important component in expanding the adoption of e-commerce in an inclusive and equitable manner throughout the city. This research also highlights the importance of digital literacy among the public, including micro business actors, to optimize the use of digital technology in business transactions. The local government is expected to strengthen regulations, provide supporting infrastructure, and open cross-sector collaboration to accelerate digital transformation in Pekanbaru. A sustainable education strategy for the community is also needed through training, digital socialization, and technical support so that all levels of society can actively participate in the digital ecosystem. Thus, synergy between the government, business actors, academics, and the community is the main key in creating an adaptive, efficient, and sustainable digital ecosystem, as well as making Pekanbaru a smart city that excels in the field of electronic commerce.