This question already has an answer here:
I'm from the UK, currently living in China with a valid Z Visa. Both my visa and passport expire in April 2017. I plan to take a quick break in America before I return home and I need to start booking flights etc asap. Problem is I will have to get a new passport before it expires as the US does not permit entry with a passport that's due to expire within six months of the date of departure from USA.
If I get a new passport now and keep my old passport, can I still provide this to the police if I have a random spot check between now and April or does the new passport void the visa?
Also, will airport security have any issues with me leaving the country with my visa being on my old passport?