After marrying a society woman, Farnsworth got heavily into debt, and borrowed money from an enlisted man, which he refused to repay. Because of this, Farnsworth, once considered to be one of the brightest young officers of the Navy, was brought to a court-martial in 1927. For conduct "tending to impair the morale of the service" and "scandalous conduct tending to the destruction of good morale", he was found guilty and was given a dishonorable discharge from the service on November 12, 1927.
Despite his disgraceful exit from the Naval service, Farnsworth still had enough social grace to make him acceptable in the best Washington society. He got most of his information by contacting former associates to solicit documents, who were unaware of the true reason for his requests, saying that he needed the information for "magazine articles". He also picked up small bits of Navy information from wives of high-ranking officers and shrewdly pieced them together. Once, feigning drunkenness and pretending that he was a Commander, he boarded a destroyer at Annapolis, tricked an ensign into giving him maneuver data, rushed back to the Japanese Embassy, had them photostatted, and returned them the next day. It was actually easy for him to obtain this as Navy security at that time was relatively lax.
However, when Farnsworth stole a confidential Navy manual The Service of Information and Security, which contained plans for battle information and tactics that were gathered from field maneuvers and tested by high-ranking naval officers, alarm bells were raised, and the Office of Naval Intelligence (ONI) was called upon to investigate its disappearance. It was learned later that he photostatted the manual and sold it to the Japanese on May 15, 1935.
During the investigation, ONI officers heard that Farnsworth had been flashing large sums of money around naval officers who knew him, despite the fact that he was believed to be destitute. Further investigation revealed that he borrowed code and signal books and had been asking questions about tactics, new ship designs, and weapons. Finally, the wife of high-ranking officer living in Annapolis complained to the ONI that Farnsworth was pushing her to allow him to read official documents. Thus, he was placed under joint surveillance by the ONI and the FBI.
The next time Farnsworth and Lewis met, the latter demanded proof of the former's relations with the Japanese. Farnsworth then called up Commander Yamaguchi in Lewis' presence and demanded money from the officer. A meeting was arranged, and Farnsworth tried to convince Lewis to accompany him by posing as a cabdriver. Lewis refused, but so anxious was Farnsworth to prove his bonafides that he took Lewis to the office where he had the confidential manual photostatted, as well as proving other corroborating evidence to his story.
The case was given to a grand jury. During the grand jury testimony, it was revealed that Farnsworth had telephoned the Japanese Embassy twice on the day before his arrest. Lt. Commander Leslie G. Genhres testified that Farnsworth took the confidential study from his desk in the Navy Department on August 1, 1934. An employee of the navy photostat plant, Mrs. Grace Jamieson, said that Farnsworth made frequent visits to the plant to copy military documents.
Based on this, the grand jury indicted Farnsworth on the charge of selling to the Japanese the confidential manual, as well as conspiracy to do the same; in the indictment, the grand jury also included Lt. Commanders Itimiya and Yamaki, who promptly left for Japan. If found guilty, Farnsworth would face a maximum sentence of 20 years.
Although Farnsworth indicated that he would base his defence on an aircraft accident he had when he took courses in NAS Pensacola, making him "irresponsible", the Navy shot down that argument, saying that no record of such an accident existed. His lawyer, in turn, asked the court-martial commission to have Itimiya and Yamaki testify in Farnsworth's defence through the American Consul General in Tokyo. However, Japan refused the request, citing Japanese law prohibiting military officers from being compelled to answer questions in a foreign country.
On February 15, 1937, Farnsworth changed his not-guilty plea to nolo contendere, dispensing with a jury trial and leaving the judge to decide on the case; if the trial had proceeded, the prosecution would have been ready to prove its case by presenting a parade of witnesses and other evidence. When the judge heard the no-contest plea, he indicated that he would review the aspects of the case before he pronounced sentence. However, a few days later, Farnsworth again changed his plea to not guilty. He reasoned out that he made his plea without prior counsel and it was based on the notoriety that resulted from his case. The judge said that Farnsworth was in his rights to change his plea before sentencing and that he would hear his motion.
This was, in fact, the first of Farnsworth's attempts to have his case dismissed. His defence team withdrew, and he informed the judge that he would conduct his defence pro se. His next move was to file a writ of habeas corpus to obtain his release. He argued that the facts alleged in the indictment, under which he was convicted, did not constitute a crime. He further argued that he did not know that nolo contendere was tantamount to a guilty plea and wanted to withdraw the plea, but was met with rejection. The court was not in any way convinced of these arguments and denied his writ.
In January 1938, he appealed the judge's decision in his petition for the writ of habeas corpus by arguing that the court erred in ruling that a petitioner could not be released "from unlawful imprisonment" by habeas corpus proceedings; further, that the court did not have jurisdiction in the first place and had no power to pronounce an indeterminate sentence. Despite his efforts, his appeal was rejected and his sentence upheld by the United States Court of Appeals for the Fifth Circuit.
He served an eleven-year prison term. He died in Manhattan at age 59.