Trimethoprim (TMP), functioning as a synergistic antibacterial agent, is utilized in diagnosing and treating diseases affecting livestock and poultry. Human consumption of the medication indirectly may lead to its drug accumulation in the body and increase drug resistance due to its prolonged metabolic duration in livestock and poultry, presenting significant health hazards. Most reported immunoassay techniques, such as ELISA and immunochromatographic assay (ICA), find it challenging to achieve the dual advantages of high sensitivity, simplicity of operation, and a wide detection range. Consequently, an open droplet microchannelbased magnetosensor for immunofluorometric assay (OMM-IFA) of trimethoprim was created, featuring a gel imager to provide a signal output derived from the highly specific antibody (Ab) targeting trimethoprim. The method exhibited high sensitivity in chicken and pork samples, with LODs of 0.300 and 0.017 ng/mL, respectively, and a wide linear range, covering trimethoprim's total maximum residue limits (MRLs). Additionally, the spiked recoveries in chicken and pork specimens varied between 81.6% and 107.9%, maintaining an acceptable variation coefficient below 15%, aligning well with the findings from the ultraperformance liquid chromatography-tandem mass spectrometry (UPLC-MS/MS) technique. The developed method achieved a much wider linear range of about 5 orders of magnitude of 10 −2 −10 3 levels with grayscale signals as the output signal, which exhibited high sensitivity, excellent applicability and simple operability based on magnetic automation.