An executive branch employee may not serve as an expert witness, for anyone except the U.S. in any proceeding in which the U.S. is a party or has a direct and substantial interest, unless specifically authorized.
For all practical purposes, this prevents a government employee from arranging to become an adverse witness against his/her agency, i.e., whistleblowing.
A Designated Agency Ethics Official may authorize an employee to serve as an expert witness in the circumstances when it is determined that:
• The employee’s testimony is in the interest of the U.S. (if the U.S. is not a party); or
• The testimony subject matter is unrelated to the employee’s duties.
None of this prohibits a federal employee from testifying as a fact witness if properly subpoenaed.