Australia’s second-largest bank has been accused of the biggest breach of the country’s money laundering and terrorism financing laws in history, including failing to detect transfers that may have been used to facilitate child exploitation in Asia.

Westpac Banking Corp. allegedly breached money laundering laws more than 23 million times, including failing to report in a timely way about $7.5 billion in international transfers, Australia’s financial-intelligence agency said in a court filing Wednesday.

Each...