You are kind of asking to prove a negative by this question, however, I can say that there is no well-known instance in which John Quincy Adams had a US government minister or employee removed due to participation as a Freemason.
Adams was a vocal critic of Freemasonry and an entire book ("Letters on the Masonic Institution", 1847) was published documenting his critiques the practice of Freemasonry.
Adams was definitely concerned with Masonic and Anti-Masonic platforms in political parties and legislatures, so indirectly there were certainly "acid tests" that could have led to the exclusion of people from party roles and thereby, indirectly to them getting governmental appointments.