The social media website said the messages posted by the bots were made to look like they had come from Democrats.
The action, only revealed last week, was taken in late September and early October.
Some of the bots had said men should not vote in midterms because they would drown out the voices of women.
A Twitter spokesman said: “We took action on relevant accounts and activity on Twitter.”
Twitter had been made aware of the problem by the Democratic Party, which is hoping to win back the senate and the house of representatives from Donald Trump’s Republican Party on 6 November.
The number of accounts deleted is small compared to recent purges, which have numbered in the millions, but it is still a win for the Democratic campaign.
The Democratic Congressional Campaign Committee has reportedly developed its own system for identifying and reporting the messages.
It was built in part from publicly available tools known as “Hoaxley” and “Botometer” developed by computer researchers at the University of Indiana.
A user can identify automated accounts, also known as bots, and analyse how they spread information.