The 35-year-old forward scored in the second half on his return to his former club, ending their unbeaten home record in the process.
McGleish, who was making his 600th appearance in the Football League, started his professional career with Charlton in 1994 but was unable to make the grade at The Valley.
However, his 48th-minute goal proved pivotal here, as the win pulls Orient away from the relegation zone.
Charlton threatened early on and David Mooney had a chance in the 27th minute to put them ahead but headed over from Lloyd Sam's cross.
McGleish then squandered Orient's best chance of the first half in the 30th minute when his controlled shot drifted wide.
Just before the break Sam should have opened the scoring for Charlton but dragged his effort wide from 12 yards. And then Deon Burton saw his goal-bound effort hacked away.
Charlton made an excellent start to the second half with Mooney drawing a save from Jamie Jones after only 25 seconds.
But they were soon trailing to McGleish's header. The striker met Sean Thornton's floated ball into the box and powered the ball past Rob Elliot with his head. Seven minutes later, Ryan Jarvis came within inches of doubling Orient's lead when his shot beat Elliot only to strike the post.