Second-harmonic generation (SHG) and two-photon excitation fluorescence (TPEF) are relatively new and promising tools for the detailed imaging of biological samples and processes at the microscopic level. By exploiting these nonlinear phenomena phototoxicity and photobleaching effects on the specimens are reduced dramatically. The main target of this work was the development of a compact inexpensive and reliable experimental apparatus for nonlinear microscopy measurements. Femtosecond laser pulses were utilized for excitation. We achieved high-resolution imaging and mapping of Caenorhabditis elegans (C. elegans) neurons and muscular structures of the pharynx, at the microscopic level by performing SHG and TPEF measurements. By detecting nonlinear phenomena such as SHG and TPEF it is feasible to extract valuable information concerning the structure and the function of nematode neurons. © 2005 Society of Photo-Optical Instrumentation Engineers.