We will use geometric Langlands theory to solve two open problems simultaneously. One is Serre's question that whether there exists a motive over Q with motivic Galois group of type E_8; the other is whether there is a Galois extension of Q with Galois group E_8(p) (the finite simple group of Lie type, p large). The answers to both questions are YES, and the method applies to E_7 and G_2 as well.