I like the idea of hitting the great wall on the way into town, but most of the well known sections also stop admitting people at around 4 or 5. Unregulated sections like huanghua don't close (please verify first), but tend to be a bit on the dangerous side, especially as dusk sets in.
In the event that plan seems too troublesome and/or ambitious, I want to emphasize that tourist attractions comprise only a small fraction of Beijing's appeal.
Assuming you end up staying at the St Regis, Ritan Park is a decent place for an evening stroll, or you might be able to hit the rooftop of the Emperor Hotel, which overlooks the Forbidden City, before dark. It's honestly hard to go wrong in Beijing during summertime evenings/nights (e.g. in my younger days, walking out of bars in the midst of that 430a sunrise was pretty much SOP).