M-Commerce applications in the world have grown exponentially over the years. It had set up for mobile users to engage wirelessly of ad hoc network infrastructure in online business irrespective of place or time. Providing anonymous, secure and trust based connection service in ad hoc network is quite a challenging task. Anonymity, security and privacy of the transaction or message transmission are the highest priority need to be delivered to the destination node on time. In this paper, a CAEC(2) M (Cellular Automata Elliptic Curve Cryptography Mix network) algorithm to secure Mobile Commerce over ad hoc network is proposed. An attempt is made to design a mix-network (Mix-Net) using elliptic curve cryptography based on cellular automata which creates a hard to trace communication to protect the anonymity of the sender and encrypt the sensitive information to avoid any eavesdropper trying to access the data during transmission. CAEC 2 M provides also confidentiality, integrity and authentication.