Before January 1, ideally. Certainly before January 15, which is when Patient Zero is believed to have entered Seattle from China.
Your fictional emperor has a big advantage over the nearby US, though. In January Trump had been impeached by the House and was preparing for his trial in the Senate.
What would have happened if Trump had announced a hard closure of the US land, sea, and air borders on January 14? No one in except US citizens, who all have to quarantine for 14 days at military bases or requisitioned hotels? MSNBC, CNN, the Times, and the rest of the media would have switched from 100% impeachment to 100% "Trump is locking down the country so he can use the military to seize total power!!!!!". Doing this might in and of itself have caused three more Senators to vote for his conviction on February 5.
It's a wonder that Trump amidst all this was able to get a China ban done. In retrospect, those behind the lies about Trump that got him impeached have much to answer for.