Most of those detained were Schalke supporters, German police said in a statement.
"Dortmund and Schalke's violent criminals consciously undermined our security concept," said police director Dieter Keil. "Their aim was to fight their rivals and innocent people."
The trouble started when several hundred visiting fans lit flares on their way to the stadium in Dortmund. They fought home supporters and then attacked police when they tried to separate them.
The Bundesliga match ended in a 2-1 win for third-placed Schalke over Dortmund who are fourth in the table.
The troublemakers had masks, pepper spray, flares and other banned objects, police said.
Officers used a water cannon to stop Schalke supporters trying to destroy a fence while mounted police were also attacked with stones.
The rival fans also provoked each other inside the stadium and more than 1,000 police were called in to keep them apart.
The two teams, only a few kilometres apart, are among the most fervently supported in Germany and have one of the biggest and longest-running rivalries in the league.