The invention relates to a distributed transaction processing method based on a Saga mode. The method is based on a lock-free Saga mode. Compensation operation is carried out on the affairs through aself-defined compensation process; consequently, final consistency is achieved, wherein a state machine engine and a simple dsl state definition language are designed, custom business process arrangement and business circulation state recording are realized, the state machine engine can customize compensation service, and when an exception occurs, the state machine engine calls the compensation service to perform rollback or retry operation, so that data consistency is ensured. In application, the method is high in performance, submitted to a local database in one stage and free of a global lock; high throughput is achieved, and transaction participants drive asynchronous execution based on events; the method has high flexibility, based on a state machine engine and a simple state definition language, the service orchestration capability can be provided, and the compensation service can be used for roll-back or retry.