Recently a veto was held in un in favour of release of convicted zakiur rahman lakhvi.Can somebody tell what was the reason given?
First of all: The decision the UN made was not about the release of Zakiur Rahman Lakhvi. The UN has no authority to decide about the release of a single person. But what the UN can do is sanction a country because of what they do or don't do.
What happened was that India put a motion into place to put sanctions on Pakistan because of their decision to release Lakhvi. Then China decided to veto this motion thus preventing the UN from taking action on Pakistan.
The reason why China decided to side with Pakistan instead of India is because China has invested in various economic projects which require the cooperation of Pakistan. Among them the trans-continental Belt and Road Initiative and the China-Pakistan Economic Corridor. China couldn't care less about islamistic terrorism, because so far they were largely unaffected by the issue. But what China does care about are their economical interests in Pakistan. So it repeatedly used its veto power in the UN to appease Pakistan and ensure their cooperation.