In enterprise cost accounting and control research, traditional activity-based costing (ABC) relies on detailed activity tracking data and complex cost allocation models, which makes data acquisition difficult, has low-cost allocation accuracy, ignores dynamic changes, and has the problem of insufficient flexibility. This paper constructs an improved ABC application framework, builds an activity-driven cost accounting model, analyzes the daily activity data of the enterprise, determines the key factors related to cost, and establishes a mapping relationship between activity and cost. This paper introduces a dynamic adjustment mechanism to adjust the weights and parameters in the cost accounting model in real time according to changes in the external environment and internal operations, thereby improving the flexibility and accuracy of cost accounting. It can integrate the ERP (Enterprise Resource Planning) system with the cost accounting model, integrate the company’s financial data, production data and sales data, use information tools to automatically update activity costs, and provide timely feedback to the cost control system; it can closely combine cost accounting and control, monitor and adjust costs in real time during the accounting process, and take timely control measures when abnormalities occur. Experiments show that in terms of cost allocation accuracy, the average SE (Standard Error) of the improved ABC in enterprises with different employee sizes is 2.1, and the average MSE (Mean Squared Error) is about 5.5. It is more stable when processing enterprise data and can better reflect the actual cost allocation. The response time of the improved ABC is 5.7 seconds when the raw material price increases by 25%. It can make adjustments faster, with better flexibility and dynamic adaptability; the experiment proves the effectiveness of this paper in the research of enterprise cost accounting and control.