An FPGA-based online trigger system has been developed for the COMET Phase-I experiment. This experiment searches for muon-to-electron conversion, which has never been observed yet. A drift chamber and trigger counters detect a mono-energetic electron from the conversion process in a 1-T solenoidal magnetic field. A highly intense muon source is applied to reach unprecedented experimental sensitivity. It also generates undesirable background particles, and a trigger rate due to these particles is expected to be much higher than an acceptable trigger rate in the data acquisition system. By using hit information from the drift chamber too, the online trigger system efficiently suppresses a background trigger rate while keeping signal-event acceptance large. A characteristic of this system is the utilization of the machine learning technique in the form of look-up tables on hardware. An initial simulation study indicates that the signal-event acceptance of the online trigger is 96% while the background trigger rate is reduced from over 90 kHz to 13 kHz. For this scenario, we have produced trigger-related electronics that construct a distributed trigger architecture. The total latency of the trigger system was estimated to be 3.2 µs, and the first operation test was carried out by using a part of the drift-chamber readout region.