The growth of online services has resulted in a great need for tools to secure systems from would-be attackers without compromising the user experience. CAPTCHAs (Completely Automated Public Turing Tests to Tell Computers and Humans Apart) are one tool for this purpose, but their popular text-based form has been rendered insecure by improvements in character recognition technology. In this paper, we propose a novel imagebased CAPTCHA which employs object recognition as its test. Inspired by the negative selection approach in biological immune systems, an innovative two-phase filtering algorithm is proposed which ensures that the CAPTCHA is resilient to automated attack while remaining easy for human users to solve. In extensive testing involving over 3,000 participants, the proposed aiCAPTCHA achieved a 92.0% human success rate. © 2017 IEEE.