This study proposes a novel artificial intelligence-enabled methodological framework for packet-based network intrusion detection system that effectively analyzes header and payload data and considers temporal connections among packets. The AI framework transforms sequential packets into a two-dimensional image, which is then passed through a convolutional neural network-based intrusion detector model. Experimental results using publicly available data sets demonstrate that the methodology can detect network attacks earlier than flow-based approaches. It also exhibits high transferability and shows promising resilience against adversarial examples.