With Hamilton disillusioned at McLaren, Ecclestone said in an interview with The Mail on Sunday that the former world champion asked him for assistance in securing a Red Bull drive alongside Sebastian Vettel.
But efforts to secure a deal collapsed when Red Bull owner Dietrich Mateschitz said he felt loyalty to Mark Webber and instead chose to retain the Australian.
Ecclestone said: "Sebastian wouldn't have cared if Lewis had signed for the team.
"Dietrich is a very honest, straightforward guy and told Mark the door was open for him to stay. That was good of him.
"Had Mark gone, Dietrich would have signed Lewis."
Hamilton's desire to move to Red Bull has long been known - with AUTOSPORT revealing at the 2011 Canadian Grand Prix that the Briton had made a secret approach to its team boss Christian Horner asking for a deal.
Ecclestone said that with the Red Bull door shut, he suggested Hamilton make a move to Mercedes, which the Briton seemed initially reluctant to do.
"'Why not talk to Mercedes, Lewis?'" Ecclestone recalled telling Hamilton. "Lewis rolled his eyes... but I told him that he had nothing to lose as he wanted out of McLaren."
- Sports & Recreation
- Red Bull
- Dietrich Mateschitz