The COMET Phase-I experiment searches for a neutrinoless muon-to-electron conversion which has never been observed yet. The world's highest intensity muon beam is applied, and it leads to an unacceptable trigger rate of O(10 6) Hz. For stable data collection, the trigger rate must be reduced to O(10 3) Hz. This requirement is met using online event classification in the detector system which holds 99% of signal events. This classification is performed by an FPGA-based trigger system, and its processing time is set to less than 5 µs by a buffer size of the detector readout electronics. A prototype board for the trigger system was developed, and communication systems for related electronics devices were also constructed. From test results, the total processing time is estimated to be 2.8 µs , which meets the requirement. We have also developed an online self-trigger system for cosmic-rays and confirmed the feasibility of this hardware logic. The trigger electronics were installed in a setup for cosmic-ray measurement, and the data acquisition was successfully done using the self-trigger system.