That is a common misconception. Actually, green electricity sources such as solar and wind have been much cheaper than fossil fuel sources like oil and coal per megawatt of production.
This is a trend that has happened in Germany and worldwide. For more information, you can see here.