The prompt and precise detection of firearms is essential in today's security environments to ensure public safety. This research paper provides a novel method for real-time weapon detection using Convolutional Neural Network (CNN) techniques and YOLOv9 object recognition framework in both live and prerecorded film. By integrating YOLOv9, object detection accuracy and speed are considerably improved, facilitating the quick identification of possible threats. The presented method exhibits strong performance in various lighting settings and environments, with excellent recall rates and precision thorough testing and assessment. This approach used CNN based architecture and deep learning to effectively detect and categorize weapons in video frames which achieves 97.62 % accuracy.