Zelensky is frighten if he failed and his life will be in danger, he make a smart(or unsmart) move to offer Ukraine to NATO hoping that Ukraine will auto become a NATO country once NATO take control of it instead of him begging for membership for the last 3 years without any success, his planning 君子报仇十年不晚.
Once NATO come into Ukraine with troops, weapons and missiles deployment, there will be chances to take back the Russia controlled Ukraine states.