With the rapid development of Internet, electronic commerce is being increasingly widely used, while Safety is the primary factor in the rapid development of electronic commerce. Distributed Intrusion Detection System can effectively improve the security of electronic commerce environment This paper analyzes the issues about electronic commerce security in detail, discusses the defects about Distributed Intrusion Detection System, analyzes the improvements of Distributed Intrusion Detection System, and fully demonstrates the importance of Distributed Intrusion Detection System in electronic commerce security.