A holonic multi-agent system combines the concept of a holon with a multi-agent system; this combination has been proven to be an effective way to build a complex system. Great progress has been made in this area, but previous studies are fragmented and lack of a task-based perspective to model different systems in the real world. Therefore, this paper proposes a formalistic model for HMAS from a task-based perspective. Not only the static organizational structure is designed, but also the dynamic running mechanism, including the self-adaptive mechanism and the task assignment mechanism based on the proposed holonic structure, are also discussed. Finally, a case study is provided to verify the self-adaptive mechanism. The experimental results show that our proposed DHMAS has the ability to adapt to the changing environment, and performs better in terms of the success rate and the response time when the system is heavily loaded.