"An unidentified actor gained unauthorized access to our internal network, collected certain data belonging to CD PROJEKT capital group, and left a ransom note," the company said on Twitter.
The game developer said the incident happened on Monday and it had contacted the police.
CD Projekt published a copy of the ransom note in which the hackers claimed to have stolen the source codes for Cyberpunk 2077 and The Witcher 3 as well as internal administrative documents.
"If we will not come to an agreement, then your source codes will be sold or leaked online," it read, giving the company 48 hours to respond.
"Investors will lose trust in your company and the stock will dive even lower."
CD Projekt's shares were down 5.2 percent on the Warsaw stock exchange at around 0900 GMT.
The company's stock has taken a beating after a series of problems surrounding the release of the much-hyped Cyberpunk 2077 in December.
The shares rose again last month after tech billionaire Elon Musk praised its design.
The company said it would not "give in to the demands nor negotiate with the actor" even though it was aware that data could be released.
"We are taking necessary steps to mitigate the consequences of such a release," it said.
Welcome to new crack resource CrackDownloadz.com! Our service can generate cracks, keygens and serials for your software to unlock it. CrackDownloadz provides a lot of popular cracks and keygens. No spyware and adware at all, just download new cracks, keygens and serials. If you have a software that needs a crack feel free to contact us.
Also you may contact us if you have software that needs to be removed from our website.