Arriving from overseas, you will have to clear Immigration in Beijing anyway. You don't mention the airlines you will use, so it's hard to answer accurately, but most probably both flights won't even be in the same terminal either. If T3 is involved, then you'll have to take a shuttle bus too. So you definitely can visit Beijing. Just remember that checking in again and going to the gate can take a long time. Moreover, budget enough time from and back to the airport -- it is quite far.
With your added details, I see that you'll arrive at T2 (Area B), and depart also from T2 (Areas E/F/G, see Beijing Airport Guide). However, you still have to go through immigration, pick up you luggage, and go through customs, then check-in. See International to Domestic Transfer. Once you're checked in, you'll have spent already 1.5 to 2 hours. That leaves you very little time to see Beijing. If I were you, I wouldn't try it.
Also, a note about checked-in luggage: rules for international flights and for Chinese domestic flights are not the same. Not only the number of luggage pieces you can take, and the weight, but also large liquid bottles have to be packed separately from your luggage, and inspected visually by the airline staff at check-in. They will be put in the cargo hold too.
If you buy bottles at the duty-free in Germany, or if you pack some in your luggage before departure, you will have to take them out, and check them in separately for your China Southern flight. There are packing corners in the airport terminals -- usually a nice little circus in itself. My advice would be not to bring any (large-ish) liquids with you. Or lighters. Lighters are forbidden on Chinese flights, and will be confiscated.