You might need to provide a more complete example.
Perhaps you are seeing an error message when your stored procedure runs, at the time the SET IDENTITY statement is executed, your new table (table1) does not yet exist. The new table (table1) is created by the SELECT INTO statement.
For example, if you execute this SQL in a standalone SQL Query window, it returns the correct expected results:
CREATE TABLE A ( ID INT NOT NULL IDENTITY PRIMARY KEY, Name NVARCHAR(16) NOT NULL )
INSERT INTO A ( Name ) SELECT 'X' UNION SELECT 'Y'
INSERT INTO A ( Name ) SELECT 'A' UNION SELECT 'B'
DELETE FROM A WHERE Name = 'A'
SELECT * INTO B FROM A WITH (NOLOCK)
SELECT * FROM B