To create an enemy beam in Pygame, you can use the pygame.draw.line() function to draw a straight line from the enemy's position to the player's position. You can then use collision detection to check if the beam has hit the player. To animate the beam, you can use a timer to periodically update the beam's position and length.