Microgrids are autonomous low-voltage power distribution systems that contain multiple distributed energy resources (DERs) and smart loads that can provide power system operation flexibility. To effectively control and coordinate multiple DERs and loads of microgrids, this paper proposes a distributed intelligent management system that employs a multi-agent-based control system so that delicate decision-making functions can be distributed to local intelligent agents. This paper presents the development of a hardware-in-the-loop simulation (HILS) system for distributed intelligent management system for microgrids and its promising application to an emergency demand response program. In the developed HILS system, intelligent agents are developed using microcontrollers and ZigBee wireless communication technology. Power system dynamic models are implemented in real-time simulation environments using the Opal-RT system. This paper presents key features of the data communication and management schemes based on multi-agent concepts. The performance of the developed system is tested for emergency demand response program applications.