The 1940 City of London by-election was a by-election held on 5 February 1940 for the British House of Commons constituency of City of London, which covered the "Square Mile" which was the United Kingdom's traditional financial district. The by-election was caused by the resignation of one of the City's two Conservative Party Members of Parliament (MPs) Sir Alan Anderson, who had held the seat since a by-election in 1935. There being no other candidates, Duncan was returned unopposed.