The silkworm (Bombyx mori) has long been considered a source of food and medicine due to its high nutritional, medicinal, and economic value in East Asia. However, in some sensitive individuals, silkworm consumption can cause allergenic reactions such as vomiting, asthma, and anaphylaxis. Therefore, the development of a reliable method for silkworm detection is required to avoid such allergenic incidents. In this study, two different methods (liquid chromatography combined with mass spectrometry [LC-MS/MS] and real-time polymerase chain reaction [PCR]) were developed to determine an efficient technique for silkworm detection in foods. The developed methods demonstrated high sensitivity in detecting the silkworm in processed foods. Silkworm-spiked model cookies were used to confirm the sensitivity of both LC-MS/MS (0.0005%) and real-time PCR (0.001%). These methods were found to be useful for detecting the silkworm in foods and avoiding allergenic reactions. To the best of our knowledge, this is the first study to compare LC-MS/MS and real-time PCR for silkworm detection in complex processed foods.