The role of e-commerce in a rapidly developing economy touches on various aspects from the definition of e-commerce to its impact in the context of the sharia economy in the Society 5.0 era. E-commerce, as electronic commerce, influences the way we conduct transactions and its relationship to Islamic sharia principles such as bai' as-salam. The definition of e-commerce is detailed from various points of view, discussing types of transactions, advantages, disadvantages, and transaction mechanisms. The concept of e-commerce is also compared with principles in Islamic law, such as conformity with sharia and the principles of trade that are permitted in Islam. Apart from that, the role of e-commerce in Society 5.0 is also explained, highlighting how technology affects human life as a whole, including the economic aspect. Society 5.0 is described as a vision that includes the use of technology to maintain a balance between economic progress and solving social problems. This research uses a literature study method to present a variety of information about e-commerce, online transactions, sharia aspects, and their relationship with the Society 5.0 era.