The main German alternative-fuel effort for military use was synthetic hydrocarbon fuels made from coal, either directly from coal by hydrogenation at high temperatures and pressures (the Bergius process, patented in 1913) or indirectly by hydrogenation of carbon monoxide, produced from coal (the Fischer-Tropsch process, developed in 1923). Germany had plentiful reserves of coal, and in principle, synthetic hydrocarbons could replace imported fuel.
Synthetic fuel produced by these processes was much more expensive than fuel from crude oil. In 1939, a barrel of synthetic fuel cost about 15 times as much to make, compared to the price of a barrel of crude oil. The cost to the consumer of a gallon/litre of synthetic petrol/gasoline was about 3 times higher than crude-oil-derived petrol/gasoline (the price of which included taxes, and profit margins for distributors and retailers).
Synthetic fuel went commercial in Germany in 1927, when I.G. Farben constructed a plant that yielded about 3.5 million barrels per year. When the Nazis came to power, energy self-sufficiency was one of their goals, and four more I.G. Farben plants were operating by the end of 1935. Other plants followed, by I.G. Farben and others, including some built by Brabag (Braunkohle Benzin AG), a Nazi-decreed petroleum cartel which I.G. Farben was a member of (whether they wanted to be or not). As noted above, production costs were high, and as production grew, government subsidies were needed to keep operating. In 1939, production had reached almost 17 million barrels per year, with the government providing over half the production cost.
The war, with a reduction in imports, meant even more plants were built. By the end of the war, there were 12 major Bergius coal hydrogenation plants and 9 major Fischer-Tropsch plants in Germany (and plants had operated in Poland and France during the war). Synthetic fuel production peaked in 1943 at about 42 million barrels (compared to 34 million barrels of crude oil imported or locally produced). Synthetic fuel plants were bombing targets during the oil bombing campaign, along with the crude oil industry; this bombing campaign focussing on ouil targets began in 1943, and is the main cause of lower synthetic fuel production in 1944 and 1945.
Alternative fuels, primarily wood gas, were used in civilian vehicles. By the end of the war, 500,000 wood-gas vehicles were in use. These heated wood to produce combustible gas, which was then used as fuel in the internal combustion engine. It was possible to use wood gas as a fuel in both petrol/gasoline and diesel engines. An example of a German wood-gas car:
For many more photos, see
Wood-gas vehicles were used in many other countries as well, although not in as large numbers as in Germany. Horse-drawn vehicles were another alternative (and were much used by the German armed forces as well as by civilians).
References:
Henry Ludmer, "Oil in Germany", The Ohio Journal of Science 47(6), 259–263 (1947). https://kb.osu.edu/bitstream/handle/1811/3612/V47N06_259.pdf
Anthony Stranges, "Germany's synthetic fuel industry, 1927-1945", pp 147-216 in J.E. Lesch (ed.), The German Chemical Industry in the Twentieth Century, Kluwer, 2000.