Germany looked set for a comfortable victory as Thomas Muller put the visitors ahead after 18 minutes however, an own goal from Mats Hummels levelled the score on the 28th minute.
Muller put his side ahead once again in the 34th minute but Scotland managed to draw level before halftime with a strike from James McArthur.
Ilkay Gundogan scored the only goal in the second half to win Germany all three points. Emre Can played the full 90 minutes at right-back while Özil was substituted off the field injury time.
Germany Group D fixtures and results
September 7, 2014 Scotland (H) 2-1
October 11 Poland (A) 0-2
October 14 Republic of Ireland (H) 1-1
November 14 Gibraltar (H) 4-0
March 29, 2015 Georgia (A) 2-0
June 13 Gibraltar (A) 7-0
September 4 Poland (H) 3-1
September 7 Scotland (A)
October 8 Republic of Ireland (A)
October 11 Georgia (H)
Scotland confirmed line-up: Marshall, Hutton, Mulgrew, R.Martin. Hanley, McArthur, Morrison, Brown, S.Fletcher, Forrest, Maloney
Germany confirmed line-up: Neuer, Hector, Hummels, Boateng, Emre Can, Schweinsteiger, Kroos, Ilkay Gundogan, Muller, Mesut Özil, Gotze