An antenna structure includes a metal housing, a switching circuit, and a first feed source. The metal housing includes a front frame, a backboard, and a side frame. The side frame defines a slot and the front frame defines a groove. A first portion of the front frame positioned at a first side of the groove forms a first branch. A second portion of the front frame extending from a second side of the groove to one end of the slot forms a second branch. The first feed source is electrically connected to the first branch and the second branch, and the first branch is grounded through the switching circuit.