The magistrate said Wilson would be fined 2,000 Hong Kong dollars ($255) for breaching the order if he doesn't comply.
A statement posted earlier on the Longview lawmaker's website had said while the gun was not registered in Hong Kong it is registered in Washington.
Those convicted of carrying a firearm without a license can be fined up to 100,000 Hong Kong dollars ($12,800) and sentenced to up to 14 years in prison.
According to his website, Wilson was traveling with his wife for a five-week vacation in Southeast Asia.
He discovered the weapon during the flight between San Francisco and Hong Kong, it said.
Persons:
Jeff Wilson, Don So, Wilson
Organizations:
Press, Hong, Longview lawmaker's, Hong Kong
Locations:
Hong Kong, Washington, Longview, United States, Southeast Asia, San Francisco, Portland