Non-Volatile Memory Express (NVMe) is a protocol that allows very high speed access to Solid State Drives (SSDs). The important thing to understand about NVMe is that it only defines how the data is read and transferred. The NVMe protocol can be used on M.2 based drives and PCIe based drives. NVMe is not comparible to M.2 because M.2 is not a protocol but instead a physical form factor specification. You can think of NVMe as the logical side while M.2 is the physical side.
NVM Express (NVMe) or Non-Volatile Memory Host Controller Interface Specification (NVMHCIS) is an open, logical-device interface specification for accessing a computer's non-volatile storage media usually attached via PCI Express (PCIe) bus The acronym NVM stands for non-volatile memory, which is often NAND flash memory that comes in several physical form factors, including solid-state drives (SSDs), PCI Express (PCIe) add-in cards and M2 cards, the successor to mSATA cards NVM Express, as a logical-device interface, has been designed to capitalize on the low latency and internal parallelism of solid-state storage devicesArchitecturally, the logic for NVMe is physically stored within and executed by the NVMe controller chip that is physically co-located with the storage media, usually an SSD