The International Paralympics Committee stripped the event from Malaysia.
IPC President Andrew Parsonssaid: “When a host country excludes athletes from a particular nation, for political reasons, then we have absolutely no alternative but to look for a new championships host.”
London was chosen to host the competition, which is being held at the London Aquatics Centre in the capital's Olympic Park in Stratford.
Mr Malyar's new world record time, of 4:33.64, was said to have "obliterated" the previous record, of 4:42.81, set in the 2012 paralympic games by Team GB gold medallist Josef Craig.
Mr Craig tweeted Mr Malyar congratulations, saying: "Great to see swimming moving forward! Very impressive!"
In February, Mr Malyar set another Paralympic swimming world record, in the 1,500 metres category, beating the previous record by almost 23 seconds.
His latest result means that he will compete in the Tokyo 2020 Paralympics.