As a widely used industrial field bus, the controller area network (CAN) lacks security mechanisms (e.g., encryption and authentication). With the development of network connectivity and the increase in external communication, CAN networks are vulnerable to security attacks (e.g., masquerade). Attackers can intrude on CAN networks to control CAN devices, causing security threats. A fingerprint-based intrusion detection system (IDS) in CAN networks can detect masquerade attacks by scanning the unique clock signals of CAN devices. However, most state-of-the-art fingerprint-based IDSs commonly use an analog-to-digital converter module with a low frequency of 60 MHz to sample CAN signals, lowering the accuracy of the trained fingerprint-based IDS model. In addition, almost all fingerprint-based IDSs are trained offline and then detected online in CAN networks, ignoring that system clock signals of hardware change over time, resulting in degraded detection performance. An intrusion detection system based on physical fingerprints can achieve effective identification of masquerade attacks. This paper proposes an online learning-enabled and fingerprint-based IDS (OFIDS) in CAN networks to increase the sampling frequency, simplify the sampling circuit, shorten the delay time, improve the detection response time, and increase the detection accuracy. OFIDS uses a high-speed comparator (i.e., TLV3501) and field-programmable gate arrays (FPGA; i.e., Xilinx ZYNQ-7010) to sample the CAN_High signal, achieving a low sampling delay time of 4.5 ns and a high sampling frequency of 1 GHz. The self-adaptability of the backpropagation neural network is taken advantage of and used to train the OFIDS model with a detection accuracy of 99.9992%. The OFIDS model is deployed to a CAN network prototype with five CAN devices (i.e., two Arduino UNO boards and three STM32 microcontrollers), where online learning is conducted with a low training time of less than 2 min to update the OFIDS model. Experimental results show that OFIDS can achieve at least 99.99% detection accuracy within 0.18 <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"><tex-math notation="LaTeX">$\mu$</tex-math></inline-formula> s in a CAN network prototype and can achieve 98% detection accuracy in a real vehicle.