Foreign Minister Murray McCully was searched at Auckland Airport before flying out to the United States last month.
The random search happened despite McCully travelling on a diplomatic passport.
A spokeswoman for McCully said the search was the result of an "administrative error".
"Due to an administrative error in New Zealand the Minister was subject to a random search before departing for Washington. The Minister was not screened in the United States."
McCully was flying to Washington on March 21 for a meeting on fighting Isis.
McCully is stepping down as Foreign Minister, a role he has held for eight years. On Monday Prime Minister Bill English announced Gerry Brownlee would be the new Foreign Minister.