Connecting an LCD (Liquid Crystal Display) to an 8051 microcontroller involves configuring the microcontroller's GPIO pins to control the display. Here's a basic example of how you can interface a 16x2 LCD with an 8051 microcontroller using C code.