This isn't true at all. You don't need to bomb civilian cities to end a war. The Japanese government, specifically the emperor had already indicated they wanted to negotiate. They were already well aware they couldn't win the war.
There is far, far more evidence that the U.S. just couldn't help itself and wanted to demonstrate our/their new weapon:
"The Japanese had, in fact, already sued for peace. The atomic bomb played no decisive part, from a purely military point of view, in the defeat of Japan."
- Chester W. Nimitz, Commander in Chief of the U.S. Pacific Fleet
In true U.S. fashion, we had to create a boogeyman to commit some atrocity in order to achieve absolution for the evil we inflicted upon our fellow man.
But hey, don't take my word for it:
* https://en.wikipedia.org/wiki/Debate_over_the_atomic_bombing...