Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
How do we understand the statement that “whoever knows himself knows his Lord”?
This has several meanings. One is that if someone comes to know their lower self, they become aware of its deceit and trickery. They then realise that they have no option but to sincerely turn to Allah and seek His help. They thus come to know Him.
Another meaning is that when we reflect on our own makeup as human beings, we come to know about our Creator. We may reflect on the fact that Allah breathed into us from His spirit, and that the true nature of the spirit is best known by Him. This points us towards knowledge of Him.