Microgrid (MG) is a key part of the future energy system that can operate in either grid-connected or island mode by enabling the growing integration of renewable energy sources such as photovoltaic energy, wind energy and hydroelectric power. One of the most substantial phenomena in micmgrids is unintentional islanding which can cause significant problems such as power quality, voltage stability and safety hazards. This paper introduces a new passive islanding detection method (IDM) for synchronous and inverter interfaced MGs. The multi-long short-term memory (LSTM) architecture which is one of the most recent and popular techniques of deep learning is first proposed by utilizing voltage and current harmonic distortion measured at the point of common coupling (PCC) of MG. For the first time, the distorted main grid is taken into account with various operating conditions. Numerical simulations are performed in MATLAB/Simulink and comparative analysis of the proposed method with intelligent IDMs is realized to verify its overall superiorities. The proposed method has achieved remarkable performance like average accuracy of 99.3% and minimum loss of 0.06. The multi-LSTM model is able to detect islanding events with accuracy of 97.93% for small than +/- 0.5% power mismatch within 50 ms detection time.