In September 1796, Johnston was appointed aide-de-camp to Governor John Hunter, and in 1800 received his brevet rank as major. In the same year Johnston was put under arrest by Lieutenant Governor William Paterson on charges of "paying spirits to a sergeant as part of his pay—and disobedience of orders". Johnston objected to trial by court-martial in the colony, and Hunter sent him to England. There the difficulties of conducting a trial with witnesses in Australia led to the proceedings being dropped, and Johnston returned to New South Wales in 1802. In 1803 Johnston took temporary command of the New South Wales Corps during the illness of Paterson, and became involved in the conflict between King and the military. In March 1804 he acted with decision when in command of the military sent against some convicts who had rebelled at Castle Hill. When Paterson was sent to Port Dalrymple, Johnston became commander of the New South Wales Corps.