subdirectory_arrow_right Nintendo Entertainment System (Platform)
There are two different candidates for the video game console with the longest lifespan, from official introduction to discontinuation, and which one holds the distinction depends on one's metrics.

In terms of support from its original developer, the longest-lasting video game console is the Famicom, the Japanese version of the Nintendo Entertainment System. The Famicom was introduced in 1983 and remained on store shelves until 2003, lasting twenty years on the market.

However, when counting support from third party manufacturers, the distinction instead goes to the Sega Master System. While Sega incrementally discontinued the device between 1991 and 1994 depending on the region, Brazilian manufacturer Tectoy received a license from Sega to continue manufacturing clones of the Master System due to its high popularity in Brazil. These clone consoles continue to be manufactured in the present day, decades after the original Master System's launch in 1985.
person VinchVolt calendar_month November 10, 2023
IGN South Africa article:

Archived page from Sega of Japan's website clarifying the launch year of the Master System:
subdirectory_arrow_right Super Nintendo Entertainment System (Platform), Arcade (Platform), Sega Game Gear (Platform), Nintendo Entertainment System (Platform), PlayStation (Platform), Game Boy Color (Platform), Neo Geo AES (Platform), Sega Mega Drive/Genesis (Platform), Game Boy Advance (Platform), Game Boy (Platform)
Attachment In 2018, rapper Soulja Boy attempted to sell his own line of video game consoles, collectively called the SouljaGame line, sold for $149.99 for a console and $99.99 for a handheld. Advertising claimed that the consoles would be compatible with a variety of consoles' games, including modern platforms like the PlayStation Vita, Nintendo 3DS, and Nintendo Switch. These, quite obviously, did not have such compatibility, but rather were a generic retro emulator console one could find on small business-oriented retail websites such as Wish and AliExpress loaded with pirated and modified games from the Neo Geo; NES; Game Boy Advance; Game Boy Color; Game Boy; Sega Genesis; SNES; Master System; Game Gear; and PlayStation libraries sold at a markup. The only difference from these pre-existing consoles being a photograph of Soulja printed onto the box. Soulja Boy would eventually stop selling SouljaGame consoles, with the website for the console redirecting to Nintendo's 3DS website.
person Rocko & Heffer calendar_month November 18, 2023
Soulja Boy selling SouljaGame line article:

Soulja Boy ends sales of SouljaGame line article:

SouljaGame unboxing and teardown showing the packaging:

Rerez video reviewing the console SouljaGame was based on, showing the console list:
Attachment A graphic board peripheral was in development for the Master System which was going to be released in 1987. Players could draw using a fully editable 16 colors bitmap with a 176x144 pixel area. The software for the peripheral was being designed by Kazuo Wakihara who had worked on Columns. The graphic board would've also been compatible with the Genesis.
Many releases of the Master System included games in the console's BIOS that could be accessed by booting up the system without a cartridge in it. Some releases included multiple games, with one in Brazil boasting 131, but most included one of the following:

Snail Maze
Hang-On & Safari Hunt
Missile Defense 3-D
Alex Kidd in Miracle World
Sonic the Hedgehog
Attachment Due to South Korea banning Japanese cultural imports at the end of World War II, the Master System was distributed by South Korean company Samsung, and was named the Gam*Boy.