To understand how brain states and behaviors are generated by neural circuits, it would be useful to be able to perturb precisely the activity of specific cell types and pathways in the nonhuman primate nervous system. We used lentivirus to target the light-activated cation channel channelrhodopsin-2 (ChR2) specifically to excitatory neurons of the macaque frontal cortex. Using a laser-coupled optical fiber in conjunction with a recording microelectrode, we showed that activation of excitatory neurons resulted in well-timed excitatory and suppressive influences on neocortical neural networks. ChR2 was safely expressed, and could mediate optical neuromodulation, in primate neocortex over many months. These findings highlight a methodology for investigating the causal role of specific cell types in nonhuman primate neural computation, cognition, and behavior, and open up the possibility of a new generation of ultraprecise neurological and psychiatric therapeutics via cell-type-specific optical neural control prosthetics.