Ferry, 20, has signed a two-year contract at Boro after failing to play a first-team game for the Bees, but had loan spells at Welling and Wycombe.
Lee, 30, leaves after 130 games for Boro along with fellow midfielder Michael Tonge and forward Jake Hyde.
Defenders Andrew Fox, Dean Wells and Nathan Kerr are also being released.
Midfielder Tom Pett, 25, has been placed on the transfer list after talks over a new contract broke down.
Ferry has joined Stevenage after the Bees gave him permission to train there during the latter part of the season.
"I've had a couple of months with the lads so I've got to know them and there isn't any settling in period," he said.
"It has been really useful in that sense so I am just looking forward to getting back from the summer and kicking on.
"The gaffer has been good with me. He has told me exactly what he wants and that is all I can ask for - a clear picture of what I need to do."
Find all the latest football transfers on our dedicated page.
League Two side Stevenage have signed midfielder James Ferry from Brentford on undisclosed terms, but have released six players, including Charlie Lee.