In July 1939, Hanke was called up for military service, having previously obtained a reserve officer's commission in 1937. From September to October 1939, he served with the 3rd Panzer Division in Poland. In May 1940, sensing a good opportunity to further his career, Hanke served under General Erwin Rommel in France with the 7th Panzer Division, 25th Panzer Regiment through June of that year. He "got along" well with Rommel who appreciated good "public relations". Hanke was awarded the Iron Cross in Second and First Class. He was discharged from the German Army in 1941 with the rank of 1st lieutenant ("Oberleutnant").