Caenorhabditis elegans (C. elegans) is a good model to study axonal and intracellular transport. Here, I describe a protocol for in vivo recording and analysis of axonal and intraflagellar transport in C. elegans.