In this study, we have tried to manipulate activities of nociceptors, which play roles in pain and a variety of physiological phenomena, and muscle cells optogenetically with adeno-associated virus (AAV) vectors or electroporation of plasmid. Blue light-induced contractions of muscle cells with expression of channelrhodopsin-2 (ChR2) were achieved, while the gene introduction caused robust damage of the cells. The gene introduction was also tried to express ChR2 or archaerhodopsin-T (ArchT) in nociceptive afferent fibers with several promotors or serotypes of AAV vectors. However, the expression of the channels or pumps was not sufficient to manipulate activities of nociceptors and pain-related behaviors. Further trials will be needed for the better manipulation of nociceptors and muscle cells.