Here, we describe a novel microfluidic platform for use in electrocrystallization experiments. The device incorporates ultra-thin graphene-based films as electrodes and as X-ray transparent windows to enable in situ X-ray diffraction analysis. Furthermore, large-area graphene films serve as a gas barrier, creating a stable sample environment over time. We characterize different methods for fabricating graphene electrodes, and validate the electrical capabilities of our device through the use of methyl viologen, a redox-sensitive dye. Proof-of-concept electrocrystallization experiments using an internal electric field at constant potential were performed using hen egg-white lysozyme (HEWL) as a model system. We observed faster nucleation and crystal growth, as well as a higher signal-to-noise for diffraction data obtained from crystals prepared in the presence of an applied electric field. Although this work is focused on the electrocrystallization of proteins for structural biology, we anticipate that this technology should also find utility in a broad range of both X-ray technologies and other applications of microfluidic technology.