This protocol describes a procedure for three-dimensional (3D) printing of bacterial colonies to study their motility and growth in complex 3D porous hydrogel matrices that are more akin to their natural habitats than conventional liquid cultures or Petri dishes.