In August 1804 he was placed under arrest by Lieutenant (Sir) Charles Menzies and sent to Sydney for disobedience of orders. In April 1805 he was found guilty by a court martial of refusing to attend a woman in child-birth and was sentenced to be publicly reprimanded  -
Sentence and Reprimand of Assistant-Surgeon Mileham in May, 1805...........
The sentence of the General Court-Martial held for the Trial of Mr. Mileham, Assistant Surgeon, viz. : —
The Court having maturely and deliberately considered the Evidence for and against the Prisoner, as well as what he had to offer in his Defence, is of opinion that he is Guilty of the first Charge, viz., for disobedience of Orders in refusing to attend a patient in the General Hospital on the 13th of April, 1805, do therefore sentence him to be publickly Reprimanded by the Commander-in-Chief.
The Court is of Opinion that he is further guilty of the second Charge, viz., for Neglect of Duty in not attending a Woman when in labour in the General Hospital on the 13th of April, 1805, do therefore Sentence him to be publickly reprimanded by the Commander-in-Chief is fully approved of, and the Court- Martial dissolved.
The Governor and Commander-in-Chief has to observe that the Proofs are so clear in substantiating Mr. Mileham's disobedience of the Principal Surgeon's Orders in a case when his Duty and Humanity equally required his prompt obedience that he entirely disapproves of Mr. Mileham's want of a due Subordination to the directions of his superior in the execution of his Duty.
The Governor perfectly coincides with the Court-Martial in considering Mr. Mileham Guilty of a neglect of Duty in not attending a Woman in labour in the General Hospital, from which conduct the Woman's Life and that of her offspring might have been endangered ; and as Mr. Mileham has recently endeavoured to evade his Duty when ordered, the Commander-in-Chief considers it necessary to inform that Mileham that on his incurring any future Censure for neglect of Duty or Disobedience of Orders it will become necessary to suspend him from his situation as Assistant Surgeon till His Majesty's Commands are received thereon.
James Mileham died on 28 September 1824, aged 61, at Castlereagh Street, Sydney; he was buried in the Sandhills cemetery and his remains were later reinterred at La Perouse.
NOTES AND LINKS
1). Trial of Thomas Jamison on the complaint of James Mileham for an assault and battery on the evening of 3 May 1803 - Sydney Gazette 29 May 1803