A perovskite oxide, BaSnO3, has been classified as one of transparent conducting materials with high electron mobility, and its application for field-effect transistors has been the focus of recent research. Here we report transistor operation in BaSnO3-based heterostructures with atomically smooth surfaces, fabricated on SrTiO3 substrates by the (Sr,Ba)SnO3 buffer technique. Indeed, modulation of band profiles at the channel interfaces with the insertion of wide bandgap (Sr,Ba)SnO3 as a barrier layer results in a significant improvement of field-effect mobility, implying effective carrier doping at the regulated heterointerface. These results provide an important step towards realization of high-performance BaSnO3-based field-effect transistors.