Although he was provided with an escape plan developed by the Soviets that would take him to Moscow by way of Mexico, David decided not to leave the United States. Subsequently, he was arrested on June 15, 1950. He quickly informed the FBI about the Julius Rosenberg and the spy ring that Julius was involved in. In spite of his preparations for the inevitability of arrest (Julius had obtained passport photos and applications for his family), Julius and Ethel did not flee in time (as had other Soviet spies, including Morris and Leona Cohen) and he was arrested on July 17, 1950. Ethel was subsequently arrested on August 11, 1950 and both were charged with espionage, as was Greenglass. Greenglass pled guilty while the Rosenbergs pled not guilty. Also arrested was Morton Sobell, another spy involved.

The Rosenbergs were tried in March of 1951 represented in the U.S. District Federal Court by the noted attorney Emanuel Bloch. Julius took the stand but denied involvement with anything actionable, repeatedly invoking his Fifth Amendment right against self-incrimination. Ethel did much the same. The jury found Ethel, Julius and Sobell guilty of espionage. Sobell was sentenced to 30 years in prison and Greenglass 15, but the judge harshly sentenced both of the Rosenbergs to death, a sentence aggressively sought by the Justice Department. The judge in the case, Irving Kaufman, reasoned that by passing the secrets to the Soviets, they had allowed the Soviet Union to begin building an atomic weapon years faster than it other would have, setting in motion a series of events that would ultimately lead to the Korean War.

The death sentences provoked world-wide criticism and charges of anti-Semitism, despite the fact that Judge Kaufman as well as two of the prosecutors was Jewish. It was believed that Ethel, whose role was much more limited than Julius' was sentenced to death in order to compel Julius to make a full confession, yet none would be forthcoming. More than 15 appeals to the United States Supreme Court and to President Harry Truman and Dwight Eisenhower were denied and the execution date was set for June 19, 1953.

Julius Rosenberg was executed in the electric chair at the Ossining Prison in upstate New York as was Ethel minutes later. Both maintained their innocence until the end. The Rosenberg case was hotly debated for years, with their innocence championed by their children. In 1995, however, the Venona messages were released, providing conclusive evidence that Julius was undoubtedly involved in espionage. Ethel, although unquestionably aware of Julius efforts, may not have participated sufficiently so as to justify a death sentence.