James Anderson was the Captain of the Ocracoke Independent Company, where he was primarily responsible for protecting that portion of the North Carolina coast. In the summer of 1777 he apprehended William Brimage, a prominent co-conspirator in the Gourd Patch Affair, who had made his way to Ocracoke in the attempt to escape the state. Brimage briefly escaped again before being captured near Roanoke Island and brought to the Edenton Jail. In a letter from October 1777, Brimage complained that Captain Anderson was still in possession of Brimage's personal affects at Ocracoke.