Non-intrusive load monitoring (NILM) enables to understand the appliance-level behavior of the consumers by using only smart meter data, and it mitigates the requirements such as high-cost sensors, maintenance/update and provides a cost-effective solution. This article presents an efficient NILM-based energy management system (EMS) for residential microgrids. Firstly, smart meter data are analyzed with a multi-task deep neural network-based approach and the appliance-level information of the consumers is extracted. Both consumption and operating status of the appliances are obtained. Afterward, the energy consumption behaviors of the end-users are analyzed using these data. Accordingly, average power consumption, operation cycles, preferred usage periods, and daily usage frequency of the appliances were obtained with an average accuracy of more than 90%. The obtained results were integrated into an EMS to create an efficient and user-centered microgrid operation. The developed model not only provided the optimum dispatch of distributed generation plants in the microgrid but also scheduled the controllable loads taking into account customers' satisfaction. It was demonstrated with the help of simulation that the proposed NILM-based EMS model improves the operation cost/customer satisfaction ratio between 45% and 65% compared to a traditional EMS.