Microhabitat use and habitat-abundance relationships of four freshwater shrimps, Atyopsis moluccensis, Macrobrachium pilimanus, Macrobrachium trompii and Macrobrachium neglectum, were surveyed in tropical streams running through primary and secondary forests in Borneo, East Malaysia. Underwater observations revealed that A. moluccensis preferred relatively high water velocity and a boulder substrate. Macrobrachium pilimanus also preferred high water velocity and a cobble substrate, whereas M. trompii occupied stream margins with slow current and fine substrates (from POM (particulate organic matter) to pebbles). In contrast, M. neglectum was distributed relatively evenly through the stream channel. The abundance of A. moluccensis, M. pilimanus and M. trompii in the stream reaches was best explained by the abundance of boulders, cobbles and POM, respectively, suggesting that the amount of preferred microhabitat is an important factor affecting shrimp abundances in the tropical rain-forest streams. The primary-forest reaches were dominated by coarse substrates, such as cobbles and boulders, while a great proportion of the streambeds in the secondary-forest reaches were covered with sand. Owing probably to such habitat differences, the abundance of both A. moluccensis and M. pilimanus, which preferred coarse substrates, was less in the secondary- than in the primary-forest reaches. These suggested that loss of preferred habitat, namely decreased coarse substrate availability, by sedimentation resulting from riparian deforestation had altered the shrimp assemblage structures.