This application provides a data cable and an electronic device. The data cable includes an AM connector, a Type-C connector, a connection cable, and at least one
capacitor (8). Two ends of the connection cable are respectively electrically connected to the AM connector and the Type-C connector. The connection cable includes: an
aluminum foil (1) configured to shield an electromagnetic wave, where
accommodation space is formed on an inner side of the
aluminum foil (1); two power lines (2), two
signal lines (3), and two internal grounding wires (4) disposed in the
accommodation space on the inner side of the
aluminum foil (1); and an external grounding wire (5) disposed on an outer side of the aluminum foil (1). The power lines (2) are configured to provide a power supply, and the
signal lines (3) are configured to transmit a
USB signal. The internal grounding wires (4) are disposed between the two
signal lines (3), and are respectively connected to the two
signal lines (3) and the inner side of the aluminum foil (1). The internal grounding wires (4) are configured to provide a loop current for the power supply and provide a reference ground for the
signal lines (3). The external grounding wire (5) is connected to the outer side of the aluminum foil (1) and a
metal housing of the AM connector. The at least one
capacitor (8) is configured to guide an electromagnetic wave coupled to the
metal housing of the Type-C connector to a grounding wire.