Shewanella oneidensis is a model bacterial strain for studies of bioelectrochemical systems (BESs). It has two extracellular electron transfer pathways: (1) shuttling electrons via an excreted mediator riboflavin; and (2) direct contact between the c-type cytochromes at the cell membrane and the electrode. Despite the extensive use of S. oneidensis in BESs such as microbial fuel cells and biosensors, many basic microbiology questions about S. oneidensis in the context of BES remain unanswered. Here, we present studies of motility and chemotaxis of S. oneidensis under well controlled concentration gradients of two electron acceptors, oxygen and oxidized form of riboflavin (flavin+), using a newly developed microfluidic platform. Experimental results demonstrate that either oxygen or flavin+ is a chemoattractant to S. oneidensis. The chemotactic tendency of S. oneidensis in a flavin+ concentration gradient is significantly enhanced in an anaerobic in contrast to an aerobic condition. Furthermore, either a low oxygen tension or a high flavin+ concentration considerably enhances the speed of S. oneidensis. This work presents a robust microfluidic platform for generating oxygen and/or flavin+ gradients in an aqueous environment, and demonstrates that two important electron acceptors, oxygen and oxidized riboflavin, cooperatively regulate S. oneidensis migration patterns. The microfluidic tools presented as well as the knowledge gained in this work can be used to guide the future design of BESs for efficient electron production.