FRANKFURT—A small German lender has filed a lawsuit against the European Central Bank in a bid to avoid coming under its supervision, marking the first legal challenge to the ECB’s new monitoring role.

In November the ECB took over direct supervision of Europe’s 120 largest banks, assuming that responsibility from national supervisors such as Germany’s financial watchdog BaFin and the German Central Bank, or Bundesbank.

The...