Analysis and control of neural circuitry requires the ability to selectively activate or inhibit neurons. Previous work showed that infrared laser light selectively excited neural activity in endogenous unmyelinated and myelinated axons. However, inhibition of neuronal firing with infrared light was only observed in limited cases, is not well understood and was not precisely controlled. Using an experimentally tractable unmyelinated preparation for detailed investigation and a myelinated preparation for validation, we report that it is possible to selectively and transiently inhibit electrically-initiated axonal activation, as well as to both block or enhance the propagation of action potentials of specific motor neurons. Thus, in addition to previously shown excitation, we demonstrate an optical method of suppressing components of the nervous system with functional spatiotemporal precision. We believe this technique is well-suited for non-invasive investigations of diverse excitable tissues and may ultimately be applied for treating neurological disorders.