Police found a device fitted to a computer in a branch of Santander which would have enabled the suspects to download data from the desktop machine.
Police arrested 12 men, aged between 23 and 50, in London on suspicion of conspiracy to steal.
The “very significant” plot targeted the bank branch in Surrey Quays in south-east London, police said.
Several addresses in Hounslow, Brent, Hillingdon, Westminster, Richmond and Slough were searched and property was seized.
The arrested men, who were detained on Thursday, remain in police custody.
The Metropolitan Police said its “time-critical, dynamic response” had thwarted a “very significant and audacious cyber-enabled offence”.
The force said the operation had helped avoid “multimillion-pound losses” from the branch at the shopping centre.
A KVM (keyboard video mouse) device was fitted to a computer within the bank which allowed data and contents of the desktop to be downloaded over the network, police said.
This would allow the remote takeover of the bank’s computers, they added.
Det Insp Mark Raymond said: “This was a sophisticated plot that could have led to the loss of a very large amount of money from the bank, and is the most significant case of this kind that we have come across.
“I would like to thank our partners from the industry who have provided valuable assistance throughout this investigation.”