An improved device for enabling a user to quickly and securely attach and detach an accessory (e.g., a scope, light, bayonet, etc.) to the Picatinny or tactical rail of a firearm. In a preferred embodiment of the present invention, the device comprises a lower portion, an upper portion and a locking mechanism. The device is relatively inexpensive to manufacture and safe and easy to use.