Albert Einstein did not invent the atomic bomb. His work helped launch the Manhattan Project, a secret operation that ran from late 1941 to 1945. The U.S. government assembled a team of the world's foremost physicists to devise an atomic bomb before Germany or Japan could do the same.
Notable scientists who were part of the Manhattan Project included Enrico Fermi, who produced the first functional fission reactor at the University of Chicago, and J. Robert Oppenheimer, who oversaw the project in Los Alamos, NM. The first atomic bomb was tested in July 1945. Less than a month later, Hiroshima and Nagasaki were destroyed by atomic bombs, ending World War II.