up from 3.7% in December, as the effects of the VAT rise were felt.
Higher oil prices also meant inflation remained well above the 2% target.
Retail Prices Index (RPI) inflation - which includes mortgage interest payments - rose to 5.1% from 4.8%.
The CPI figure is the highest since November 2008, and will put pressure on the Bank of England to lift interest rates to curb accelerating inflation.
The CPI measure has now been one percentage point or more above target for 14 months.
Bank of England governor Mervyn King has now written to the government, after sending three such letters last year, explaining the outlook for inflation and what will be done to tackle it.
In his letter he says inflation is likely to rise towards 5% in the coming months.Referring to expected interest rate increases, he added: "The MPC's central judgement, under the assumption that Bank rate increases in line with market expectations, remains that inflation will fall back so that it is about as likely to be above the target as below it two to three years ahead."
Mr King said the rise in inflation was due to the VAT rise, the past weakness of the pound and recent rises in commodity prices.
"In his view, the 4% rise in the CPI in the past 12 months is unfortunate - but temporary, and almost entirely driven by factors beyond the Bank's control," said the BBC's economics editor Stephanie Flanders.
"Until this month, I would say that the majority of City experts have agreed with him that most of the upward pressure comes from the fall in the pound, VAT changes, and global changes in the price of food, energy and other commodities.
"But there are some warning flags in the January numbers."
In his reply to Mr King's letter, Chancellor George Osborne said he recognised that commodity prices had been "a key driver of recent UK inflation". However, there was no reference to the recent VAT increase.
Shadow chancellor Ed Balls, speaking on BBC Radio 5 live, blamed inflation on the VAT rise, which he described as "a mistake".